22LibQiPython - 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 ` `
66Python module.
77
8+ __ LibQi_repo _
9+
810Building
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
1214wheel that can be uploaded on PyPi _) or of a "system" archive.
1315
1416.. _standalone :
17+
1518Standalone (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
2023also sets this mode automatically when used.
2124
2225In this mode, the project will build libqi and install all its dependencies as
2326part 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
4245arguments, which means that you can almost entirely customize how the native
4346part 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
4649toolchain to build the native part of the wheel (e.g. if you are using qi
4750toolchains):
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
6972the 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
8588Our 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
9497Dependencies
9598~~~~~~~~~~~~
9699
97100The 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
101104used to customize how the build system finds the libraries or fetches the
102105subprojects.
103106
104107Most 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
106109on these variables and their values.
107110
108111LibQi
109112>>>>>
110113
111114The 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
124127It is possible to skip the download step and use an existing source directory by
125- setting its path as the `FETCH_CONTENT_SOURCE_DIR_LIBQI ` CMake variable. The
128+ setting its path as the `` FETCHCONTENT_SOURCE_DIR_LIBQI ` ` CMake variable. The
126129build 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
129132Python
130133>>>>>>
131134
132135The build system uses the FindPython _ CMake module. It will try to honor the
133136following 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
139142pybind11
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
144147customized 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
151156Boost
152157>>>>>
153158
154159The build system will look for the Boost libraries on the system or in the
155160toolchain if one is set. The expected version of the libraries is specified as
156- the `BOOST_VERSION ` variable.
161+ the `` BOOST_VERSION ` ` variable.
157162
158163The build system uses the FindBoost _ CMake module.
159164
@@ -170,13 +175,15 @@ The build system uses the FindICU_ CMake module.
170175GoogleTest
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
175180customized 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
181188Install
182189~~~~~~~
@@ -195,7 +202,7 @@ Crosscompiling
195202--------------
196203
197204The 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
199206path 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
0 commit comments