From 154596a39b2b26c90e46ec851b8f05ea08fa47d4 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Tue, 27 Apr 2021 09:17:53 +0200 Subject: Remove make install target from python and rewrite documentation accordingly --- src/common/doc/installation.h | 4 ++++ src/python/CMakeLists.txt | 2 -- src/python/doc/installation.rst | 14 ++++---------- 3 files changed, 8 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h index c2e63a24..ce393c38 100644 --- a/src/common/doc/installation.h +++ b/src/common/doc/installation.h @@ -30,6 +30,10 @@ make \endverbatim * This action may require to be in the sudoer or administrator of the machine in function of the operating system and * of CMAKE_INSTALL_PREFIX. * + * \note Python module will be compiled by the `make` command, but `make install` will not install it. Please refer to + * the Python + * module installation documentation. + * * \subsection testsuites Test suites * To test your build, run the following command in a terminal: * \verbatim make test \endverbatim diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 73303a24..a1440cbc 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -274,8 +274,6 @@ if(PYTHONINTERP_FOUND) add_custom_target(python ALL DEPENDS gudhi.so COMMENT "Do not forget to add ${CMAKE_CURRENT_BINARY_DIR}/ to your PYTHONPATH before using examples or tests") - install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install)") - set(GUDHI_PYTHON_PATH_ENV "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:$ENV{PYTHONPATH}") # Documentation generation is available through sphinx - requires all modules # Make it first as sphinx test is by far the longest test which is nice when testing in parallel diff --git a/src/python/doc/installation.rst b/src/python/doc/installation.rst index 66efe45a..2881055f 100644 --- a/src/python/doc/installation.rst +++ b/src/python/doc/installation.rst @@ -99,20 +99,14 @@ Or install it definitely in your Python packages folder: .. code-block:: bash cd /path-to-gudhi/build/python - # May require sudo or administrator privileges - make install + python setup.py install # add --user to the command if you do not have the permission + # Or 'pip install .' .. note:: - :code:`make install` is only a - `CMake custom targets `_ - to shortcut :code:`python setup.py install` command. It does not take into account :code:`CMAKE_INSTALL_PREFIX`. - But one can use :code:`python setup.py install ...` specific options in the python directory: - -.. code-block:: bash - - python setup.py install --prefix /home/gudhi # Install in /home/gudhi directory + But one can use + `alternate location installation `_. Test suites =========== -- cgit v1.2.3