Skip to content

Commit cd8870d

Browse files
authored
Merge pull request #622 from darioizzo/pypidocs
Add PyPI documentation
2 parents e97139a + 4244ffc commit cd8870d

1 file changed

Lines changed: 42 additions & 19 deletions

File tree

doc/sphinx/install.rst

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ Dependencies
77
------------
88

99
pagmo is written in modern C++, and it requires a compiler able to understand
10-
at least C++17. pagmo is currently tested on the following setups:
10+
at least C++17. pagmo is tested on a range of modern setups; the project's
11+
GitHub Actions CI exercises representative platforms and toolchains (see
12+
https://github.com/esa/pagmo2/blob/master/.github/workflows/main.yml for the
13+
current matrix).
1114

12-
* GCC 9 on GNU/Linux,
13-
* Clang 11 on OSX,
14-
* MSVC 2017 on Windows.
15+
Typical tested toolchains include:
1516

16-
The officially-supported architectures are 64-bit x86, ARM and PowerPC.
17+
- Ubuntu 22.04 (GCC),
18+
- macOS (Apple Clang, including arm64 runners),
19+
- Visual Studio 2022 on Windows.
20+
21+
The officially-supported architectures are 64-bit x86 and arm64. Support for other architectures (e.g. PowerPC) is possible,
22+
but it is not guaranteed and it is not tested by the pagmo CI.
1723

1824
The pagmo C++ library has the following **mandatory** dependencies:
1925

@@ -31,7 +37,8 @@ Additionally, pagmo has the following **optional** dependencies:
3137

3238
Additionally, `CMake <https://cmake.org/>`__ is the build system used by
3339
pagmo and it must also be available when
34-
installing from source (the minimum required version is 3.8).
40+
installing from source (the minimum required version is 3.20 — see
41+
`CMakeLists.txt <https://github.com/esa/pagmo2/blob/master/CMakeLists.txt>`__).
3542

3643
Packages
3744
--------
@@ -66,6 +73,29 @@ and they are regularly updated when new pagmo versions are released.
6673
Please refer to the `conda documentation <https://docs.conda.io/en/latest/>`__ for instructions on how to setup and manage
6774
your conda installation.
6875

76+
PyPI / pip
77+
^^^^^^^^^
78+
79+
If Python wheels for the pagmo bindings are published on PyPI you can
80+
install them with pip:
81+
82+
.. code-block:: console
83+
84+
$ pip install pagmo
85+
86+
Note: `pip install pagmo` installs the Python bindings (if wheels are
87+
available for your platform) and does not provide the C++ headers or the
88+
development package. For C++ development, or when wheels are not available,
89+
prefer the `conda` packages (`pagmo` and `pagmo-devel`) or build from source
90+
as described below.
91+
92+
Note: the Python bindings for pagmo are not available on all platforms,
93+
and they are not built for all pagmo releases. Developers in the core
94+
team build them via a dedicated manual workflow occasionally.
95+
96+
See the available wheels and release files on the PyPI project page:
97+
`pagmo on PyPI <https://pypi.org/project/pagmo/>`__.
98+
6999
Arch Linux
70100
^^^^^^^^^^
71101

@@ -178,27 +208,20 @@ Additionally, there are various useful CMake variables you can set, such as:
178208
Please consult `CMake's documentation <https://cmake.org/cmake/help/latest/>`_
179209
for more details about CMake's variables and options.
180210

181-
A typical CMake invocation for pagmo may look something like this:
182211

183-
.. code-block:: console
184-
185-
$ cmake ../ -DPAGMO_BUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=~/.local
186-
187-
That is, we build the test suite and we
188-
will be installing pagmo into our home directory into the ``.local``
189-
subdirectory. If CMake runs without errors, we can then proceed to actually
190-
building pagmo:
212+
A typical CMake invocation for pagmo may look something like this:
191213

192214
.. code-block:: console
193215
194-
$ cmake --build .
216+
$ mkdir -p build && cd build
217+
$ cmake -S .. -B . -DPAGMO_BUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=$HOME/.local
195218
196-
This command will build the pagmo library and, if requested, the test suite.
197-
Next, we can install pagmo with the command:
219+
If CMake runs without errors, build and install with:
198220

199221
.. code-block:: console
200222
201-
$ cmake --build . --target install
223+
$ cmake --build . --parallel
224+
$ cmake --build . --target install
202225
203226
This command will install the pagmo library and header files to
204227
the directory tree indicated by the ``CMAKE_INSTALL_PREFIX`` variable.

0 commit comments

Comments
 (0)