From 974a045acfdae6a9980d9473f9dc3ece716aa0e1 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Sun, 31 May 2020 09:23:14 +0200 Subject: Add some fields for PyPi nice render --- src/python/setup.py.in | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/python') diff --git a/src/python/setup.py.in b/src/python/setup.py.in index b9f4e3f0..55d2b604 100644 --- a/src/python/setup.py.in +++ b/src/python/setup.py.in @@ -68,7 +68,17 @@ setup( author='GUDHI Editorial Board', author_email='gudhi-contact@lists.gforge.inria.fr', version='@GUDHI_VERSION@', - url='http://gudhi.gforge.inria.fr/', + url='https://gudhi.inria.fr/', + project_urls={ + 'Bug Tracker': 'https://github.com/GUDHI/gudhi-devel/issues', + 'Documentation': 'https://gudhi.inria.fr/python/latest/', + 'Source Code': 'https://github.com/GUDHI/gudhi-devel', + 'License': 'https://gudhi.inria.fr/licensing/' + }, + description='The Gudhi library is an open source library for Computational Topology and Topological Data ' \ + 'Analysis (TDA). It offers state-of-the-art algorithms to construct various types of simplicial complexes, ' \ + 'data structures to represent them, and algorithms to compute geometric approximations of shapes and ' \ + 'persistent homology.', ext_modules = ext_modules, install_requires = ['cython','numpy >= 1.9',], setup_requires = ['numpy >= 1.9','pybind11',], -- cgit v1.2.3 From 433a8cdaa111ebb777450fc1ee2e316480e4b46a Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Sun, 31 May 2020 10:36:47 +0200 Subject: Add introduction to pypi description and new release version --- CMakeGUDHIVersion.txt | 2 +- src/python/CMakeLists.txt | 3 +++ src/python/setup.py.in | 14 ++++++++++---- 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'src/python') diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index 59226274..3d8be42d 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,6 +1,6 @@ set (GUDHI_MAJOR_VERSION 3) set (GUDHI_MINOR_VERSION 2) -set (GUDHI_PATCH_VERSION 0a0) +set (GUDHI_PATCH_VERSION 0a1) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) message(STATUS "GUDHI version : ${GUDHI_VERSION}") diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index ab08cd6d..d4cb7477 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -235,6 +235,9 @@ if(PYTHONINTERP_FOUND) file(COPY "gudhi/point_cloud" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/gudhi") file(COPY "gudhi/weighted_rips_complex.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/gudhi") + # Other .py files + file(COPY "introduction.md" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + add_custom_command( OUTPUT gudhi.so WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} diff --git a/src/python/setup.py.in b/src/python/setup.py.in index 55d2b604..ff000a2c 100644 --- a/src/python/setup.py.in +++ b/src/python/setup.py.in @@ -13,6 +13,7 @@ from Cython.Build import cythonize from numpy import get_include as numpy_get_include import sys import pybind11 +from os import path __author__ = "Vincent Rouvreau" __copyright__ = "Copyright (C) 2016 Inria" @@ -62,6 +63,11 @@ for module in pybind11_modules: runtime_library_dirs=runtime_library_dirs, )) +# read the contents of introduction.md +this_directory = path.abspath(path.dirname(__file__)) +with open(path.join(this_directory, 'introduction.md'), encoding='utf-8') as f: + long_description = f.read() + setup( name = 'gudhi', packages=find_packages(), # find_namespace_packages(include=["gudhi*"]) @@ -75,10 +81,10 @@ setup( 'Source Code': 'https://github.com/GUDHI/gudhi-devel', 'License': 'https://gudhi.inria.fr/licensing/' }, - description='The Gudhi library is an open source library for Computational Topology and Topological Data ' \ - 'Analysis (TDA). It offers state-of-the-art algorithms to construct various types of simplicial complexes, ' \ - 'data structures to represent them, and algorithms to compute geometric approximations of shapes and ' \ - 'persistent homology.', + description='The Gudhi library is an open source library for ' \ + 'Computational Topology and Topological Data Analysis (TDA).', + long_description=long_description, + long_description_content_type='text/markdown', ext_modules = ext_modules, install_requires = ['cython','numpy >= 1.9',], setup_requires = ['numpy >= 1.9','pybind11',], -- cgit v1.2.3 From 3b91ae863718c402a991c5807579f578d266a04b Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Sun, 31 May 2020 10:43:07 +0200 Subject: add md file --- src/python/introduction.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/python/introduction.md (limited to 'src/python') diff --git a/src/python/introduction.md b/src/python/introduction.md new file mode 100644 index 00000000..3277e0ac --- /dev/null +++ b/src/python/introduction.md @@ -0,0 +1,30 @@ +![](https://gudhi.inria.fr/images/gudhi_architecture.png) + +#Introduction + +The Gudhi library is an open source library for Computational Topology and +Topological Data Analysis (TDA). It offers state-of-the-art algorithms +to construct various types of simplicial complexes, data structures to +represent them, and algorithms to compute geometric approximations of shapes +and persistent homology. + +The GUDHI library offers the following interoperable modules: +* Complexes: + * Cubical + * Simplicial: Rips, Witness, Alpha and Čech complexes + * Cover: Nerve and Graph induced complexes +* Data structures and basic operations: + * Simplex tree, Skeleton blockers and Toplex map + * Construction, update, filtration and simplification +* Topological descriptors computation +* Manifold reconstruction +* Topological descriptors tools: + * Bottleneck distance + * Statistical tools + * Persistence diagram and barcode + +For more information about Topological Data Analysis and its workflow, please +refer to the [Wikipedia TDA dedicated page][1]. + + [1]: https://en.wikipedia.org/wiki/Topological_data_analysis + -- cgit v1.2.3 From 5141caeff03f1e8c8c4ccae1ee7ca43fbcb2925f Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Sun, 31 May 2020 11:01:24 +0200 Subject: It was not markdown but rst... --- src/python/CMakeLists.txt | 2 +- src/python/introduction.md | 30 ------------------------------ src/python/introduction.rst | 33 +++++++++++++++++++++++++++++++++ src/python/setup.py.in | 2 +- 4 files changed, 35 insertions(+), 32 deletions(-) delete mode 100644 src/python/introduction.md create mode 100644 src/python/introduction.rst (limited to 'src/python') diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index d4cb7477..fee6b6f5 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -236,7 +236,7 @@ if(PYTHONINTERP_FOUND) file(COPY "gudhi/weighted_rips_complex.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/gudhi") # Other .py files - file(COPY "introduction.md" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY "introduction.rst" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") add_custom_command( OUTPUT gudhi.so diff --git a/src/python/introduction.md b/src/python/introduction.md deleted file mode 100644 index 3277e0ac..00000000 --- a/src/python/introduction.md +++ /dev/null @@ -1,30 +0,0 @@ -![](https://gudhi.inria.fr/images/gudhi_architecture.png) - -#Introduction - -The Gudhi library is an open source library for Computational Topology and -Topological Data Analysis (TDA). It offers state-of-the-art algorithms -to construct various types of simplicial complexes, data structures to -represent them, and algorithms to compute geometric approximations of shapes -and persistent homology. - -The GUDHI library offers the following interoperable modules: -* Complexes: - * Cubical - * Simplicial: Rips, Witness, Alpha and Čech complexes - * Cover: Nerve and Graph induced complexes -* Data structures and basic operations: - * Simplex tree, Skeleton blockers and Toplex map - * Construction, update, filtration and simplification -* Topological descriptors computation -* Manifold reconstruction -* Topological descriptors tools: - * Bottleneck distance - * Statistical tools - * Persistence diagram and barcode - -For more information about Topological Data Analysis and its workflow, please -refer to the [Wikipedia TDA dedicated page][1]. - - [1]: https://en.wikipedia.org/wiki/Topological_data_analysis - diff --git a/src/python/introduction.rst b/src/python/introduction.rst new file mode 100644 index 00000000..2cc4642e --- /dev/null +++ b/src/python/introduction.rst @@ -0,0 +1,33 @@ +.. figure:: + https://gudhi.inria.fr/images/gudhi_architecture.png + :figclass: align-center + :width: 100 % + :alt: GUDHI + +Introduction +============ + +The Gudhi library is an open source library for Computational Topology and +Topological Data Analysis (TDA). It offers state-of-the-art algorithms +to construct various types of simplicial complexes, data structures to +represent them, and algorithms to compute geometric approximations of shapes +and persistent homology. + +The GUDHI library offers the following interoperable modules: + +* Complexes: + * Cubical + * Simplicial: Rips, Witness, Alpha and Čech complexes + * Cover: Nerve and Graph induced complexes +* Data structures and basic operations: + * Simplex tree, Skeleton blockers and Toplex map + * Construction, update, filtration and simplification +* Topological descriptors computation +* Manifold reconstruction +* Topological descriptors tools: + * Bottleneck distance + * Statistical tools + * Persistence diagram and barcode + +For more information about Topological Data Analysis and its workflow, please +refer to the `Wikipedia TDA dedicated page `_. diff --git a/src/python/setup.py.in b/src/python/setup.py.in index ff000a2c..4725bb44 100644 --- a/src/python/setup.py.in +++ b/src/python/setup.py.in @@ -65,7 +65,7 @@ for module in pybind11_modules: # read the contents of introduction.md this_directory = path.abspath(path.dirname(__file__)) -with open(path.join(this_directory, 'introduction.md'), encoding='utf-8') as f: +with open(path.join(this_directory, 'introduction.rst'), encoding='utf-8') as f: long_description = f.read() setup( -- cgit v1.2.3 From 524c5f3e8c48c25ad96d2e43634e73c18d8805c5 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 1 Jun 2020 08:26:48 +0200 Subject: try to fix pypi doc --- CMakeGUDHIVersion.txt | 2 +- src/python/introduction.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/python') diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index 3ebdf68c..d344f04f 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,6 +1,6 @@ set (GUDHI_MAJOR_VERSION 3) set (GUDHI_MINOR_VERSION 2) -set (GUDHI_PATCH_VERSION 0a2) +set (GUDHI_PATCH_VERSION 0a3) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) message(STATUS "GUDHI version : ${GUDHI_VERSION}") diff --git a/src/python/introduction.rst b/src/python/introduction.rst index 2cc4642e..adfed36e 100644 --- a/src/python/introduction.rst +++ b/src/python/introduction.rst @@ -1,4 +1,4 @@ -.. figure:: +.. image:: https://gudhi.inria.fr/images/gudhi_architecture.png :figclass: align-center :width: 100 % -- cgit v1.2.3 From 999ca34a509f6f6222a343306b725ce0bbbce795 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 1 Jun 2020 10:12:45 +0200 Subject: Try to fix rst doc for Pypi --- CMakeGUDHIVersion.txt | 2 +- src/python/introduction.rst | 1 - src/python/setup.py.in | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/python') diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index d344f04f..75aedb74 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,6 +1,6 @@ set (GUDHI_MAJOR_VERSION 3) set (GUDHI_MINOR_VERSION 2) -set (GUDHI_PATCH_VERSION 0a3) +set (GUDHI_PATCH_VERSION 0a4) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) message(STATUS "GUDHI version : ${GUDHI_VERSION}") diff --git a/src/python/introduction.rst b/src/python/introduction.rst index adfed36e..3e9faae9 100644 --- a/src/python/introduction.rst +++ b/src/python/introduction.rst @@ -1,6 +1,5 @@ .. image:: https://gudhi.inria.fr/images/gudhi_architecture.png - :figclass: align-center :width: 100 % :alt: GUDHI diff --git a/src/python/setup.py.in b/src/python/setup.py.in index 4725bb44..f8eeafc4 100644 --- a/src/python/setup.py.in +++ b/src/python/setup.py.in @@ -63,7 +63,7 @@ for module in pybind11_modules: runtime_library_dirs=runtime_library_dirs, )) -# read the contents of introduction.md +# read the contents of introduction.rst this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'introduction.rst'), encoding='utf-8') as f: long_description = f.read() @@ -83,8 +83,8 @@ setup( }, description='The Gudhi library is an open source library for ' \ 'Computational Topology and Topological Data Analysis (TDA).', + long_description_content_type='text/x-rst', long_description=long_description, - long_description_content_type='text/markdown', ext_modules = ext_modules, install_requires = ['cython','numpy >= 1.9',], setup_requires = ['numpy >= 1.9','pybind11',], -- cgit v1.2.3 From 6d113d120d7e07df4909a7de1ae014cfb3571f38 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 1 Jun 2020 10:30:02 +0200 Subject: Try to fix rst doc for Pypi --- CMakeGUDHIVersion.txt | 2 +- src/python/introduction.rst | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src/python') diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index 75aedb74..b790b828 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,6 +1,6 @@ set (GUDHI_MAJOR_VERSION 3) set (GUDHI_MINOR_VERSION 2) -set (GUDHI_PATCH_VERSION 0a4) +set (GUDHI_PATCH_VERSION 0a5) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) message(STATUS "GUDHI version : ${GUDHI_VERSION}") diff --git a/src/python/introduction.rst b/src/python/introduction.rst index 3e9faae9..90d9a381 100644 --- a/src/python/introduction.rst +++ b/src/python/introduction.rst @@ -1,7 +1,4 @@ -.. image:: - https://gudhi.inria.fr/images/gudhi_architecture.png - :width: 100 % - :alt: GUDHI +.. image:: https://gudhi.inria.fr/images/gudhi_architecture.png Introduction ============ -- cgit v1.2.3 From 7ff9d4ceeb659cac3af10a9f9d80c7267c47363a Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 1 Jun 2020 14:46:40 +0200 Subject: Let's go like this --- CMakeGUDHIVersion.txt | 2 +- src/python/introduction.rst | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'src/python') diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index b790b828..ffcbc53e 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,6 +1,6 @@ set (GUDHI_MAJOR_VERSION 3) set (GUDHI_MINOR_VERSION 2) -set (GUDHI_PATCH_VERSION 0a5) +set (GUDHI_PATCH_VERSION 0a6) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) message(STATUS "GUDHI version : ${GUDHI_VERSION}") diff --git a/src/python/introduction.rst b/src/python/introduction.rst index 90d9a381..11c06ac5 100644 --- a/src/python/introduction.rst +++ b/src/python/introduction.rst @@ -1,8 +1,3 @@ -.. image:: https://gudhi.inria.fr/images/gudhi_architecture.png - -Introduction -============ - The Gudhi library is an open source library for Computational Topology and Topological Data Analysis (TDA). It offers state-of-the-art algorithms to construct various types of simplicial complexes, data structures to -- cgit v1.2.3 From 59d3fa0aa4ed6628f0dfbe3424c1d7a5c6f9a382 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 1 Jun 2020 16:05:32 +0200 Subject: Simplify setup.py to read introduction.rst --- CMakeGUDHIVersion.txt | 2 +- src/python/setup.py.in | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/python') diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index ffcbc53e..95e67372 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,6 +1,6 @@ set (GUDHI_MAJOR_VERSION 3) set (GUDHI_MINOR_VERSION 2) -set (GUDHI_PATCH_VERSION 0a6) +set (GUDHI_PATCH_VERSION 0a7) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) message(STATUS "GUDHI version : ${GUDHI_VERSION}") diff --git a/src/python/setup.py.in b/src/python/setup.py.in index f8eeafc4..dc163a37 100644 --- a/src/python/setup.py.in +++ b/src/python/setup.py.in @@ -13,7 +13,6 @@ from Cython.Build import cythonize from numpy import get_include as numpy_get_include import sys import pybind11 -from os import path __author__ = "Vincent Rouvreau" __copyright__ = "Copyright (C) 2016 Inria" @@ -64,9 +63,8 @@ for module in pybind11_modules: )) # read the contents of introduction.rst -this_directory = path.abspath(path.dirname(__file__)) -with open(path.join(this_directory, 'introduction.rst'), encoding='utf-8') as f: - long_description = f.read() +with open("introduction.rst", "r") as fh: + long_description = fh.read() setup( name = 'gudhi', -- cgit v1.2.3 From d46bfa4c50cc3bb52eaee5dffc6b798b0ae236f6 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Tue, 9 Jun 2020 07:49:45 +0200 Subject: move cython from install_requires to setup_requires --- CMakeGUDHIVersion.txt | 2 +- src/python/setup.py.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/python') diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index 857b0056..d2d98dea 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,6 +1,6 @@ set (GUDHI_MAJOR_VERSION 3) set (GUDHI_MINOR_VERSION 2) -set (GUDHI_PATCH_VERSION 0a12) +set (GUDHI_PATCH_VERSION 0a13) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) message(STATUS "GUDHI version : ${GUDHI_VERSION}") diff --git a/src/python/setup.py.in b/src/python/setup.py.in index dc163a37..875f1577 100644 --- a/src/python/setup.py.in +++ b/src/python/setup.py.in @@ -84,6 +84,6 @@ setup( long_description_content_type='text/x-rst', long_description=long_description, ext_modules = ext_modules, - install_requires = ['cython','numpy >= 1.9',], - setup_requires = ['numpy >= 1.9','pybind11',], + install_requires = ['numpy >= 1.9',], + setup_requires = ['cython','numpy >= 1.9','pybind11',], ) -- cgit v1.2.3 From e4a59f9ec6685534b03474cbcfe9395d601516e2 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Thu, 11 Jun 2020 07:23:23 +0200 Subject: Add distributor the right to add dll to the package --- .github/workflows/pip-packaging-windows.yml | 7 ++----- CMakeGUDHIVersion.txt | 2 +- src/python/CMakeLists.txt | 5 ++++- src/python/gudhi/__init__.py.in | 3 +++ src/python/gudhi/_distributor_init.py | 18 ++++++++++++++++++ 5 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 src/python/gudhi/_distributor_init.py (limited to 'src/python') diff --git a/.github/workflows/pip-packaging-windows.yml b/.github/workflows/pip-packaging-windows.yml index 95205258..fe4d0227 100644 --- a/.github/workflows/pip-packaging-windows.yml +++ b/.github/workflows/pip-packaging-windows.yml @@ -35,14 +35,11 @@ jobs: cd build cmake -DCMAKE_BUILD_TYPE=Release -DGMP_INCLUDE_DIR="c:/vcpkg/installed/x64-windows/include" -DGMP_LIBRARIES="c:/vcpkg/installed/x64-windows/lib/mpir.lib" -DGMP_LIBRARIES_DIR="c:/vcpkg/installed/x64-windows/lib" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DPython_ADDITIONAL_VERSIONS=3 .. cd src/python + cp c:/vcpkg/installed/x64-windows/bin/mpfr.dll .libs/ + cp c:/vcpkg/installed/x64-windows/bin/mpir.dll .libs/ python setup.py bdist_wheel - name: Publish on PyPi env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: python -m twine upload --repository-url https://test.pypi.org/legacy/ build/src/python/dist/* - - name: Upload artifacts - uses: actions/upload-artifact@v1 - with: - name: dependencies - path: c:/vcpkg/installed/x64-windows/bin/ diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index 4ad3921d..794b6ebf 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,6 +1,6 @@ set (GUDHI_MAJOR_VERSION 3) set (GUDHI_MINOR_VERSION 2) -set (GUDHI_PATCH_VERSION 0a16) +set (GUDHI_PATCH_VERSION 0a17) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) message(STATUS "GUDHI version : ${GUDHI_VERSION}") diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index fee6b6f5..b35c8de7 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -235,8 +235,11 @@ if(PYTHONINTERP_FOUND) file(COPY "gudhi/point_cloud" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/gudhi") file(COPY "gudhi/weighted_rips_complex.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/gudhi") - # Other .py files + # Some files for pip package file(COPY "introduction.rst" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") + file(COPY "gudhi/_distributor_init.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/gudhi") + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/gudhi/.libs") + message(" o o o ${CMAKE_CURRENT_BINARY_DIR}/gudhi/.libs") add_custom_command( OUTPUT gudhi.so diff --git a/src/python/gudhi/__init__.py.in b/src/python/gudhi/__init__.py.in index 79e12fbc..e4198dcf 100644 --- a/src/python/gudhi/__init__.py.in +++ b/src/python/gudhi/__init__.py.in @@ -10,6 +10,9 @@ from importlib import import_module from sys import exc_info +# Allow distributors to run custom init code +from . import _distributor_init + __author__ = "GUDHI Editorial Board" __copyright__ = "Copyright (C) 2016 Inria" __license__ = "https://gudhi.inria.fr/licensing/" diff --git a/src/python/gudhi/_distributor_init.py b/src/python/gudhi/_distributor_init.py new file mode 100644 index 00000000..0ed451f9 --- /dev/null +++ b/src/python/gudhi/_distributor_init.py @@ -0,0 +1,18 @@ +''' +Helper to preload windows dlls to prevent dll not found errors. +Once a DLL is preloaded, its namespace is made available to any subsequent DLL. +''' +import os +from ctypes import WinDLL +import glob +if os.name == 'nt': + # convention for storing / loading the DLL from gudhi/.libs/, if present + try: + basedir = os.path.dirname(__file__) + except: + pass + else: + libs_dir = os.path.abspath(os.path.join(basedir, '.libs')) + if os.path.isdir(libs_dir): + for filename in glob.glob(os.path.join(libs_dir, '*dll')): + WinDLL(os.path.abspath(filename)) -- cgit v1.2.3 From 0f7cc48907e1b28e114d37e3bd30a2237d9f6c8c Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Thu, 11 Jun 2020 08:09:01 +0200 Subject: cannot import WinDLL from ctypes on non-windows systems --- CMakeGUDHIVersion.txt | 2 +- src/python/gudhi/_distributor_init.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/python') diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index fab3ee75..21f3d58c 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,6 +1,6 @@ set (GUDHI_MAJOR_VERSION 3) set (GUDHI_MINOR_VERSION 2) -set (GUDHI_PATCH_VERSION 0a18) +set (GUDHI_PATCH_VERSION 0a19) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) message(STATUS "GUDHI version : ${GUDHI_VERSION}") diff --git a/src/python/gudhi/_distributor_init.py b/src/python/gudhi/_distributor_init.py index 0ed451f9..6f3dc8a2 100644 --- a/src/python/gudhi/_distributor_init.py +++ b/src/python/gudhi/_distributor_init.py @@ -3,8 +3,6 @@ Helper to preload windows dlls to prevent dll not found errors. Once a DLL is preloaded, its namespace is made available to any subsequent DLL. ''' import os -from ctypes import WinDLL -import glob if os.name == 'nt': # convention for storing / loading the DLL from gudhi/.libs/, if present try: @@ -14,5 +12,7 @@ if os.name == 'nt': else: libs_dir = os.path.abspath(os.path.join(basedir, '.libs')) if os.path.isdir(libs_dir): + from ctypes import WinDLL + import glob for filename in glob.glob(os.path.join(libs_dir, '*dll')): WinDLL(os.path.abspath(filename)) -- cgit v1.2.3 From aec85514aeaeac51d1589e6a24c4c393df892f91 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Thu, 11 Jun 2020 12:03:49 +0200 Subject: Upload dlls from gudhi directory --- .github/workflows/pip-packaging-windows.yml | 4 ++-- CMakeGUDHIVersion.txt | 2 +- src/python/CMakeLists.txt | 3 --- src/python/gudhi/__init__.py.in | 3 --- src/python/gudhi/_distributor_init.py | 18 ------------------ src/python/setup.py.in | 1 + 6 files changed, 4 insertions(+), 27 deletions(-) delete mode 100644 src/python/gudhi/_distributor_init.py (limited to 'src/python') diff --git a/.github/workflows/pip-packaging-windows.yml b/.github/workflows/pip-packaging-windows.yml index f229b74f..d529d4f3 100644 --- a/.github/workflows/pip-packaging-windows.yml +++ b/.github/workflows/pip-packaging-windows.yml @@ -35,8 +35,8 @@ jobs: cd build cmake -DCMAKE_BUILD_TYPE=Release -DGMP_INCLUDE_DIR="c:/vcpkg/installed/x64-windows/include" -DGMP_LIBRARIES="c:/vcpkg/installed/x64-windows/lib/mpir.lib" -DGMP_LIBRARIES_DIR="c:/vcpkg/installed/x64-windows/lib" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DPython_ADDITIONAL_VERSIONS=3 .. cd src/python - cp c:/vcpkg/installed/x64-windows/bin/mpfr.dll gudhi/.libs/ - cp c:/vcpkg/installed/x64-windows/bin/mpir.dll gudhi/.libs/ + cp c:/vcpkg/installed/x64-windows/bin/mpfr.dll gudhi/ + cp c:/vcpkg/installed/x64-windows/bin/mpir.dll gudhi/ python setup.py bdist_wheel - name: Publish on PyPi env: diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index 21f3d58c..85d69190 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,6 +1,6 @@ set (GUDHI_MAJOR_VERSION 3) set (GUDHI_MINOR_VERSION 2) -set (GUDHI_PATCH_VERSION 0a19) +set (GUDHI_PATCH_VERSION 0a20) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) message(STATUS "GUDHI version : ${GUDHI_VERSION}") diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index b35c8de7..966f5ef0 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -237,9 +237,6 @@ if(PYTHONINTERP_FOUND) # Some files for pip package file(COPY "introduction.rst" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") - file(COPY "gudhi/_distributor_init.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/gudhi") - file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/gudhi/.libs") - message(" o o o ${CMAKE_CURRENT_BINARY_DIR}/gudhi/.libs") add_custom_command( OUTPUT gudhi.so diff --git a/src/python/gudhi/__init__.py.in b/src/python/gudhi/__init__.py.in index e4198dcf..79e12fbc 100644 --- a/src/python/gudhi/__init__.py.in +++ b/src/python/gudhi/__init__.py.in @@ -10,9 +10,6 @@ from importlib import import_module from sys import exc_info -# Allow distributors to run custom init code -from . import _distributor_init - __author__ = "GUDHI Editorial Board" __copyright__ = "Copyright (C) 2016 Inria" __license__ = "https://gudhi.inria.fr/licensing/" diff --git a/src/python/gudhi/_distributor_init.py b/src/python/gudhi/_distributor_init.py deleted file mode 100644 index 6f3dc8a2..00000000 --- a/src/python/gudhi/_distributor_init.py +++ /dev/null @@ -1,18 +0,0 @@ -''' -Helper to preload windows dlls to prevent dll not found errors. -Once a DLL is preloaded, its namespace is made available to any subsequent DLL. -''' -import os -if os.name == 'nt': - # convention for storing / loading the DLL from gudhi/.libs/, if present - try: - basedir = os.path.dirname(__file__) - except: - pass - else: - libs_dir = os.path.abspath(os.path.join(basedir, '.libs')) - if os.path.isdir(libs_dir): - from ctypes import WinDLL - import glob - for filename in glob.glob(os.path.join(libs_dir, '*dll')): - WinDLL(os.path.abspath(filename)) diff --git a/src/python/setup.py.in b/src/python/setup.py.in index 875f1577..07ad818f 100644 --- a/src/python/setup.py.in +++ b/src/python/setup.py.in @@ -86,4 +86,5 @@ setup( ext_modules = ext_modules, install_requires = ['numpy >= 1.9',], setup_requires = ['cython','numpy >= 1.9','pybind11',], + package_data={"": ["*.dll"], }, ) -- cgit v1.2.3 From b50a41f53af6937c6f030d08f2b969b9024e17ac Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 12 Jun 2020 23:10:37 +0200 Subject: Mention pip package --- src/python/doc/installation.rst | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'src/python') diff --git a/src/python/doc/installation.rst b/src/python/doc/installation.rst index a66e910e..525ca84e 100644 --- a/src/python/doc/installation.rst +++ b/src/python/doc/installation.rst @@ -5,20 +5,47 @@ Installation ############ -Conda -***** -The easiest way to install the Python version of GUDHI is using -`conda `_. +Packages +******** +The easiest way to install the Python version of GUDHI is using pre-built packages. +We recommend `conda `_ + +.. code-block:: bash + + conda install -c conda-forge gudhi + +Gudhi is also available on `PyPI `_ + +.. code-block:: bash + + pip install gudhi + +Third party packages are also available, for instance on Debian or Ubuntu + +.. code-block:: bash + + apt install python3-gudhi + +In all cases, you may still want to install some of the optional `run time dependencies`_. Compiling ********* +These instructions are for people who want to compile gudhi from source, they are +unnecessary if you installed a binary package of Gudhi as above. They assume that +you have downloaded a `release `_, +with a name like `gudhi.3.2.0.tar.gz`, then run `tar xf gudhi.3.2.0.tar.gz`, which +created a directory `gudhi.3.2.0`, hereinafter referred to as `/path-to-gudhi/`. +If you are instead using a git checkout, beware that the paths are a bit +different, and in particular the `python/` subdirectory is actually `src/python/` +there. + The library uses c++14 and requires `Boost `_ :math:`\geq` 1.56.0, `CMake `_ :math:`\geq` 3.1 to generate makefiles, `NumPy `_, `Cython `_ and `pybind11 `_ to compile the GUDHI Python module. It is a multi-platform library and compiles on Linux, Mac OSX and Visual -Studio 2017. +Studio 2017 or later. On `Windows `_ , only Python :math:`\geq` 3.5 are available because of the required Visual Studio version. -- cgit v1.2.3