summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-06-11 12:03:49 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-06-11 12:03:49 +0200
commitaec85514aeaeac51d1589e6a24c4c393df892f91 (patch)
treeefc7a50ea17d89a54675b0dd0ed6c05a18de5aef
parent0f7cc48907e1b28e114d37e3bd30a2237d9f6c8c (diff)
Upload dlls from gudhi directory
-rw-r--r--.github/workflows/pip-packaging-windows.yml4
-rw-r--r--CMakeGUDHIVersion.txt2
-rw-r--r--src/python/CMakeLists.txt3
-rw-r--r--src/python/gudhi/__init__.py.in3
-rw-r--r--src/python/gudhi/_distributor_init.py18
-rw-r--r--src/python/setup.py.in1
6 files changed, 4 insertions, 27 deletions
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"], },
)