Skip to content

Commit 8dff0ef

Browse files
author
Vincent Palancher
committed
doc: Fixes README.rst errors and erroneous content-type in setup.py.
Change-Id: Iaf4999e85f11e128b8e65ae54c44302861dc1bf5 Reviewed-on: http://gerrit2.aldebaran.lan/1371 Reviewed-by: jmonnon <jmonnon@aldebaran.com> Reviewed-by: philippe.martin <philippe.martin@softbankrobotics.com> Tested-by: vincent.palancher <vincent.palancher@softbankrobotics.com>
1 parent 24dadc7 commit 8dff0ef

2 files changed

Lines changed: 51 additions & 44 deletions

File tree

README.rst

Lines changed: 50 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,30 @@
22
LibQiPython - LibQi Python bindings
33
===================================
44

5-
This repository contains the official Python bindings of the `LibQi`_, the `qi`
5+
This repository contains the official Python bindings of the `LibQi`__, the ``qi``
66
Python module.
77

8+
__ LibQi_repo_
9+
810
Building
911
========
1012

11-
This project supports the building of a "standalone" package (for instance as a
13+
This project supports the building of a *standalone* package (for instance as a
1214
wheel that can be uploaded on PyPi_) or of a "system" archive.
1315

1416
.. _standalone:
17+
1518
Standalone (wheel)
1619
------------------
1720

18-
This build mode is also referred to as the "standalone" mode. It is enabled by
19-
passing `-DQIPYTHON_STANDALONE=ON` to the CMake call. The Python setup script
21+
This build mode is also referred to as the *standalone* mode. It is enabled by
22+
passing ``-DQIPYTHON_STANDALONE=ON`` to the CMake call. The Python setup script
2023
also sets this mode automatically when used.
2124

2225
In this mode, the project will build libqi and install all its dependencies as
2326
part of the project.
2427

25-
The package can be built from the `setup.py` script:
28+
The package can be built from the ``setup.py`` script:
2629

2730
.. code:: bash
2831
@@ -42,7 +45,7 @@ handles any option the latter can handle. Additionally, it can take CMake
4245
arguments, which means that you can almost entirely customize how the native
4346
part is built.
4447

45-
In particular, you can use the `CMAKE_TOOLCHAIN_FILE` variable to specify a
48+
In particular, you can use the ``CMAKE_TOOLCHAIN_FILE`` variable to specify a
4649
toolchain to build the native part of the wheel (e.g. if you are using qi
4750
toolchains):
4851

@@ -65,13 +68,13 @@ first build libqi then libqi-python.
6568
qibuild configure
6669
qibuild make
6770
68-
You can also set the `QI_DIR` variable at the CMake call to let it know it of
71+
You can also set the ``QI_DIR`` variable at the CMake call to let it know it of
6972
the location of the libqi package.
7073

7174
.. code:: bash
7275
7376
mkdir build && cd build
74-
cmake .. -DQI_DIR=<path to the libqi installation>
77+
cmake .. -DQI_DIR=/path/to/libqi/install/dir
7578
cmake --build .
7679
7780
@@ -84,76 +87,78 @@ least CMake v3.17.
8487

8588
Our CMake scripts may take a few parameters:
8689

87-
- `QIPYTHON_STANDALONE`, when set, builds the library in "standalone" mode.
90+
- ``QIPYTHON_STANDALONE``, when set, builds the library in *standalone* mode.
8891
Refer to the standalone_ section for details.
89-
- `QIPYTHON_FORCE_STRIP`, when set, forces the build system to strip the
92+
- ``QIPYTHON_FORCE_STRIP``, when set, forces the build system to strip the
9093
libqi-python native module library at install, resulting in a smaller binary.
91-
- `QI_WITH_TESTS`, when set, enables building of tests. This option is ignored
94+
- ``QI_WITH_TESTS``, when set, enables building of tests. This option is ignored
9295
when cross-compiling.
9396

9497
Dependencies
9598
~~~~~~~~~~~~
9699

97100
The project has a few dependencies and the build system might report errors if
98-
it fails to find them. It uses either `FindXXX` CMake modules through the
99-
`find_package` command or the `FetchContent` module for subprojects. Either way,
100-
any parameter that these modules and the `find_package` command accept can be
101+
it fails to find them. It uses either ``FindXXX`` CMake modules through the
102+
``find_package`` command or the ``FetchContent`` module for subprojects. Either way,
103+
any parameter that these modules and the ``find_package`` command accept can be
101104
used to customize how the build system finds the libraries or fetches the
102105
subprojects.
103106

104107
Most of the variables described here are defined in the
105-
`cmake/set_dependencies.cmake` file. You may refer to this file for more details
108+
``cmake/set_dependencies.cmake`` file. You may refer to this file for more details
106109
on these variables and their values.
107110

108111
LibQi
109112
>>>>>
110113

111114
The project's dependencies on LibQi depends on the building mode:
112115

113-
- In system mode, it will expect to find it as a binary package. The location
114-
of the binary package installation can be specified through the `QI_DIR`
116+
- In **system mode**, it will expect to find it as a binary package. The location
117+
of the binary package installation can be specified through the ``QI_DIR``
115118
variable.
116-
- In standalone mode, it will download and compile it as a subproject through
117-
the `FetchContent` CMake module. How it is downloaded can be customized
119+
- In **standalone mode**, it will download and compile it as a subproject through
120+
the ``FetchContent`` CMake module. How it is downloaded can be customized
118121
through the following variables:
119122

120-
- `LIBQI_VERSION`
121-
- `LIBQI_GIT_REPOSITORY`
122-
- `LIBQI_GIT_TAG`
123+
- ``LIBQI_VERSION``
124+
- ``LIBQI_GIT_REPOSITORY``
125+
- ``LIBQI_GIT_TAG``
123126

124127
It is possible to skip the download step and use an existing source directory by
125-
setting its path as the `FETCHCONTENT_SOURCE_DIR_LIBQI` CMake variable. The
128+
setting its path as the ``FETCHCONTENT_SOURCE_DIR_LIBQI`` CMake variable. The
126129
build system will still check that the version of the sources matches the
127-
`LIBQI_VERSION` value if it is set.
130+
``LIBQI_VERSION`` value if it is set.
128131

129132
Python
130133
>>>>>>
131134

132135
The build system uses the FindPython_ CMake module. It will try to honor the
133136
following variables if they are set:
134137

135-
- `PYTHON_VERSION_STRING`
136-
- `PYTHON_LIBRARY`
137-
- `PYTHON_INCLUDE_DIR`
138+
- ``PYTHON_VERSION_STRING``
139+
- ``PYTHON_LIBRARY``
140+
- ``PYTHON_INCLUDE_DIR``
138141

139142
pybind11
140143
>>>>>>>>
141144

142-
The build system will by default download and compile pybind11_ as a
143-
subproject through the `FetchContent` CMake module. How it is downloaded can be
145+
The build system will by default download and compile pybind11__ as a
146+
subproject through the ``FetchContent`` CMake module. How it is downloaded can be
144147
customized through the following variables:
145148

146-
- `PYBIND11_VERSION`
147-
- `PYBIND11_GIT_REPOSITORY`
148-
- `PYBIND11_GIT_TAG`
149+
__ pybind11_repo_
150+
151+
- ``PYBIND11_VERSION``
152+
- ``PYBIND11_GIT_REPOSITORY``
153+
- ``PYBIND11_GIT_TAG``
149154

150155

151156
Boost
152157
>>>>>
153158

154159
The build system will look for the Boost libraries on the system or in the
155160
toolchain if one is set. The expected version of the libraries is specified as
156-
the `BOOST_VERSION` variable.
161+
the ``BOOST_VERSION`` variable.
157162

158163
The build system uses the FindBoost_ CMake module.
159164

@@ -170,13 +175,15 @@ The build system uses the FindICU_ CMake module.
170175
GoogleTest
171176
>>>>>>>>>>
172177

173-
The build system will by default download and compile GoogleTest_ as a
174-
subproject through the `FetchContent` CMake module. How it is downloaded can be
178+
The build system will by default download and compile GoogleTest__ as a
179+
subproject through the ``FetchContent`` CMake module. How it is downloaded can be
175180
customized through the following variables:
176181

177-
- `GOOGLETEST_VERSION`
178-
- `GOOGLETEST_GIT_REPOSITORY`
179-
- `GOOGLETEST_GIT_TAG`
182+
__ GoogleTest_repo_
183+
184+
- ``GOOGLETEST_VERSION``
185+
- ``GOOGLETEST_GIT_REPOSITORY``
186+
- ``GOOGLETEST_GIT_TAG``
180187

181188
Install
182189
~~~~~~~
@@ -195,7 +202,7 @@ Crosscompiling
195202
--------------
196203

197204
The project supports cross-compiling as explained in the `CMake manual about
198-
toolchains`__. You may simply set the `CMAKE_TOOLCHAIN_FILE` variable to the
205+
toolchains`__. You may simply set the ``CMAKE_TOOLCHAIN_FILE`` variable to the
199206
path of the CMake file in your toolchain.
200207

201208
__ CMake_toolchains_
@@ -210,16 +217,16 @@ When enabled, tests can be executed with `CTest`_.
210217
cd build
211218
ctest . --output-on-failure
212219
213-
.. _LibQi: https://github.com/aldebaran/libqi
220+
.. _LibQi_repo: https://github.com/aldebaran/libqi
214221
.. _PyPi: https://pypi.org/
215222
.. _scikit-build: https://scikit-build.readthedocs.io/en/latest/
216223
.. _setuptools: https://setuptools.readthedocs.io/en/latest/setuptools.html
217224
.. _qibuild: https://github.com/aldebaran/qibuild
218-
.. _pybind11: https://pybind11.readthedocs.io/en/latest/
225+
.. _pybind11_repo: https://pybind11.readthedocs.io/en/latest/
219226
.. _FindPython: https://cmake.org/cmake/help/latest/module/FindPython.html
220227
.. _FindBoost: https://cmake.org/cmake/help/latest/module/FindBoost.html
221228
.. _FindOpenSSL: https://cmake.org/cmake/help/latest/module/FindOpenSSL.html
222229
.. _FindICU: https://cmake.org/cmake/help/latest/module/FindICU.html
223-
.. _GoogleTest: https://github.com/google/googletest
230+
.. _GoogleTest_repo: https://github.com/google/googletest
224231
.. _CMake_toolchains: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html
225-
.. _CTest: https://cmake.org/cmake/help/latest/manual/ctest.1.html
232+
.. _CTest: https://cmake.org/cmake/help/latest/manual/ctest.1.html

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
version=version['__version__'],
2626
description='LibQi Python bindings',
2727
long_description=long_description,
28-
long_description_content_type='text/markdown',
28+
long_description_content_type='text/x-rst',
2929
keywords=['libqi', 'qi', 'naoqi',
3030
'softbank', 'robotics', 'aldebaran',
3131
'robot', 'nao', 'pepper', 'romeo'],

0 commit comments

Comments
 (0)