|
| 1 | +# distutils is deprecated; to be removed for Python 3.12. |
| 2 | +# See https://numpy.org/devdocs/reference/distutils_status_migration.html for |
| 3 | +# migration advice. |
| 4 | +# This setup.py file no longer uses numpy.distutils so it might be easy to |
| 5 | +# fully move to setuptools. |
| 6 | + |
1 | 7 | import os |
2 | 8 | import setuptools # used indirectly for bdist_wheel cmd and long_description_content_type |
3 | 9 | from distutils.core import setup |
4 | 10 | from distutils.extension import Extension |
5 | | -import numpy.distutils.misc_util |
| 11 | +import numpy as np |
6 | 12 |
|
7 | 13 | with open("README.md", 'r') as readme: |
8 | 14 | long_description = readme.read() |
9 | 15 |
|
10 | 16 | current_dir = os.getcwd() |
11 | 17 | arrow_dir = os.path.join(current_dir, 'arrow') |
12 | | -include = [arrow_dir] + numpy.distutils.misc_util.get_numpy_include_dirs() |
13 | 18 |
|
14 | 19 | # Compile the Cython code to C for development builds: |
15 | 20 | # USE_CYTHON=1 python setup.py build_ext --inplace |
|
24 | 29 | cython_extensions = [ |
25 | 30 | Extension('arrow.arrowhead', |
26 | 31 | sources=['arrow/mersenne.c', 'arrow/obsidian.c', 'arrow/arrowhead'+ext,], |
27 | | - include_dirs=['arrow'] + numpy.distutils.misc_util.get_numpy_include_dirs(), |
| 32 | + include_dirs=['arrow', np.get_include()], |
28 | 33 | define_macros=[('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION')], |
29 | 34 | )] |
30 | 35 |
|
|
38 | 43 |
|
39 | 44 | setup( |
40 | 45 | name='stochastic-arrow', |
41 | | - version='0.5.0', |
| 46 | + version='0.5.1', |
42 | 47 | packages=['arrow'], |
43 | 48 | author='Ryan Spangler, John Mason, Jerry Morrison, Chris Skalnik, Travis Ahn-Horst', |
44 | 49 | author_email='ryan.spangler@gmail.com', |
45 | 50 | url='https://github.com/CovertLab/arrow', |
46 | 51 | license='MIT', |
47 | | - include_dirs=include, |
| 52 | + include_dirs=[arrow_dir, np.get_include()], |
48 | 53 | ext_modules=cython_extensions, |
49 | 54 | long_description=long_description, |
50 | 55 | long_description_content_type='text/markdown', |
|
0 commit comments