summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/python/doc/installation.rst13
-rw-r--r--src/python/setup.py.in19
2 files changed, 6 insertions, 26 deletions
diff --git a/src/python/doc/installation.rst b/src/python/doc/installation.rst
index f8456799..d459145b 100644
--- a/src/python/doc/installation.rst
+++ b/src/python/doc/installation.rst
@@ -14,10 +14,11 @@ Compiling
*********
The library uses c++14 and requires `Boost <https://www.boost.org/>`_ ≥ 1.56.0,
`CMake <https://www.cmake.org/>`_ ≥ 3.1 to generate makefiles,
-`NumPy <http://numpy.org>`_ and `Cython <https://www.cython.org/>`_ to compile
+`NumPy <http://numpy.org>`_, `Cython <https://www.cython.org/>`_ and
+`pybind11 <https://github.com/pybind/pybind11>`_ to compile
the GUDHI Python module.
It is a multi-platform library and compiles on Linux, Mac OSX and Visual
-Studio 2015.
+Studio 2017.
On `Windows <https://wiki.python.org/moin/WindowsCompilers>`_ , only Python
≥ 3.5 are available because of the required Visual Studio version.
@@ -257,14 +258,6 @@ The :doc:`Wasserstein distance </wasserstein_distance_user>`
module requires `POT <https://pot.readthedocs.io/>`_, a library that provides
several solvers for optimization problems related to Optimal Transport.
-Pybind11
-========
-
-The :doc:`Wasserstein distance </wasserstein_distance_user>` module requires
-`pybind11 <https://pybind11.readthedocs.io/>`_, a library that provides
-interoperability between C++ and Python, for its interface to `Hera
-<https://bitbucket.org/grey_narn/hera/src/master/>`_.
-
Scikit-learn
============
diff --git a/src/python/setup.py.in b/src/python/setup.py.in
index 851188bd..d05e4675 100644
--- a/src/python/setup.py.in
+++ b/src/python/setup.py.in
@@ -12,6 +12,7 @@ from setuptools import setup, Extension
from Cython.Build import cythonize
from numpy import get_include as numpy_get_include
import sys
+import pybind11
__author__ = "Vincent Rouvreau"
__copyright__ = "Copyright (C) 2016 Inria"
@@ -27,20 +28,6 @@ library_dirs=[@GUDHI_PYTHON_LIBRARY_DIRS@]
include_dirs = [numpy_get_include(), '@CMAKE_CURRENT_SOURCE_DIR@/gudhi/', @GUDHI_PYTHON_INCLUDE_DIRS@]
runtime_library_dirs=[@GUDHI_PYTHON_RUNTIME_LIBRARY_DIRS@]
-# Copied from https://github.com/pybind/python_example/blob/master/setup.py
-class get_pybind_include(object):
- """Helper class to determine the pybind11 include path
- The purpose of this class is to postpone importing pybind11
- until it is actually installed, so that the ``get_include()``
- method can be invoked. """
-
- def __init__(self, user=False):
- self.user = user
-
- def __str__(self):
- import pybind11
- return pybind11.get_include(self.user)
-
# Create ext_modules list from module list
ext_modules = []
for module in modules:
@@ -64,7 +51,7 @@ ext_modules.append(Extension(
language = 'c++',
include_dirs = include_dirs +
['@HERA_WASSERSTEIN_INCLUDE_DIR@',
- get_pybind_include(False), get_pybind_include(True)],
+ pybind11.get_include(False), pybind11.get_include(True)],
extra_compile_args=extra_compile_args + [@GUDHI_PYBIND11_EXTRA_COMPILE_ARGS@],
))
@@ -76,6 +63,6 @@ setup(
version='@GUDHI_VERSION@',
url='http://gudhi.gforge.inria.fr/',
ext_modules = ext_modules,
- install_requires = ['cython','numpy >= 1.9','pybind11',],
+ install_requires = ['cython','numpy >= 1.9',],
setup_requires = ['numpy >= 1.9','pybind11',],
)