Skip to content

Commit

Permalink
Merge pull request #658 from axiak/add-cythonize-call
Browse files Browse the repository at this point in the history
Adds cythonize() call to extensions in setup.py()
  • Loading branch information
lmcinnes authored Oct 23, 2024
2 parents 356722f + 7c2bfba commit aef934c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
HAVE_CYTHON = True
except ImportError as e:
warnings.warn(e.args[0])
cythonize = lambda ext: ext
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
HAVE_CYTHON = False
Expand Down Expand Up @@ -42,6 +43,7 @@ def run(self):
sources=['hdbscan/dist_metrics.pyx'])



def readme():
with open('README.rst') as readme_file:
return readme_file.read()
Expand Down Expand Up @@ -78,12 +80,13 @@ def requirements():
'license': 'BSD',
'packages': ['hdbscan', 'hdbscan.tests'],
'install_requires': requirements(),
'ext_modules': [_hdbscan_tree,
'ext_modules': cythonize([
_hdbscan_tree,
_hdbscan_linkage,
_hdbscan_boruvka,
_hdbscan_reachability,
_prediction_utils,
dist_metrics],
dist_metrics]),
'cmdclass': {'build_ext': CustomBuildExtCommand},
'test_suite': 'nose.collector',
'tests_require': ['nose'],
Expand Down

0 comments on commit aef934c

Please sign in to comment.