-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathsetup.py
More file actions
41 lines (33 loc) · 897 Bytes
/
setup.py
File metadata and controls
41 lines (33 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
import setuptools
import sys
class NumpyImport:
def __repr__(self):
import numpy as np
return np.get_include()
__fspath__ = __repr__
# NOTE: If fastremap.cpp does not exist, you must run
# cython -3 --cplus fastremap.pyx
extra_compile_args = [
'-std=c++11', '-O3',
]
if sys.platform == 'darwin':
extra_compile_args += ['-stdlib=libc++', '-mmacosx-version-min=10.9']
setuptools.setup(
setup_requires=['pbr', 'cython', 'numpy'],
python_requires=">=3.9,<4.0",
pbr=True,
ext_modules=[
setuptools.Extension(
'fastremap.fastremap',
sources=['fastremap/fastremap.pyx'],
depends=[],
language='c++',
language_level=3,
include_dirs=["fastremap", str(NumpyImport())],
extra_compile_args=extra_compile_args,
)
],
packages=setuptools.find_packages(),
long_description_content_type='text/markdown',
)