Skip to content

Commit

Permalink
Merge pull request #83 from ecologic/updates-for-non-conda-build
Browse files Browse the repository at this point in the history
Fixes for SDist package and build outside of Conda
  • Loading branch information
wolfv committed Oct 18, 2021
2 parents 634270b + 2ec6387 commit 8f80c8d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include include/*.hpp
include src/docs/*.h
16 changes: 11 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ def __str__(self):
return pybind11.get_include(self.user)

include_dirs = [
"./include/",
"./src/docs/",
# Path to pybind11 headers
'./include/',
get_pybind_include(),
get_pybind_include(user=True)
get_pybind_include(user=True),
]

library_dirs = None
Expand All @@ -37,6 +38,8 @@ def __str__(self):
if not os.path.exists(cgal_include):
cgal_include = os.path.join(conda_prefix, 'Library', 'include', 'CGAL')
include_dirs.append(os.path.join(conda_prefix, 'Library', 'include'))
elif os.path.exists('/usr/include/CGAL/'):
cgal_include = '/usr/include/CGAL/'
else:
cgal_include = '/usr/local/include/CGAL/'

Expand Down Expand Up @@ -74,7 +77,7 @@ def __str__(self):
library_dir = os.path.join(prefix, 'lib')

if cgal_version < (5, 0):
# currently we also need to add the apparently windows specific suffix here, it's unclear if this is
# currently we also need to add the apparently windows specific suffix here, it's unclear if this is
# necessary if CGAL is installed not from CONDA.
# suffix = "-vc140-mt-4.14.1"
adjusted_cgal_libs = []
Expand Down Expand Up @@ -220,8 +223,11 @@ def build_extensions(self):
description='scikit-geometry, the python computational geometry library',
long_description='',
ext_modules=ext_modules,
install_requires=['pybind11>=2.3'],
setup_requires=['pybind11>=2.3'],
install_requires=['pybind11>=2.3,<2.8', 'numpy'],
setup_requires=['pybind11>=2.3,<2.8'],
extras_require={
"drawing": ["matplotlib"],
},
cmdclass={'build_ext': BuildExt},
zip_safe=False,
packages=['skgeom'],
Expand Down
2 changes: 0 additions & 2 deletions skgeom/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# import all contents from C++ extension module
from ._skgeom import *

from . import draw

from ._version import version_info, __version__
11 changes: 7 additions & 4 deletions skgeom/draw.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from matplotlib import pyplot as plt
from matplotlib import cm
import matplotlib.patches as patches
from matplotlib.path import Path
try:
from matplotlib import pyplot as plt
from matplotlib import cm
import matplotlib.patches as patches
from matplotlib.path import Path
except ImportError:
raise ImportError("The `matplotlib` package is required by the skgeom.draw module.")

import skgeom

Expand Down

0 comments on commit 8f80c8d

Please sign in to comment.