-
Notifications
You must be signed in to change notification settings - Fork 43
/
setup.py
92 lines (79 loc) · 2.71 KB
/
setup.py
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import os
import setuptools
import sys
class NumpyImport:
def __repr__(self):
import numpy as np
return np.get_include()
__fspath__ = __repr__
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname), 'rt') as f:
return f.read()
def requirements():
with open(os.path.join(os.path.dirname(__file__), 'requirements.txt'), 'rt') as f:
return f.readlines()
# NOTE: If cc3d.cpp does not exist:
# cython -3 --fast-fail -v --cplus cc3d.pyx
extra_compile_args = []
if sys.platform == 'win32':
extra_compile_args += [
'/std:c++11', '/O2'
]
else:
extra_compile_args += [
'-std=c++11', '-O3'
]
if sys.platform == 'darwin':
extra_compile_args += [ '-stdlib=libc++', '-mmacosx-version-min=10.9' ]
setuptools.setup(
name="connected-components-3d",
version="3.22.0",
setup_requires=['pbr', 'numpy', 'cython'],
install_requires=['numpy'],
python_requires=">=3.8,<4.0",
extras_requires={
"stack": [ "crackle-codec", "fastremap" ],
},
ext_modules=[
setuptools.Extension(
'fastcc3d',
sources=[ 'cc3d/fastcc3d.pyx' ],
language='c++',
include_dirs=[ 'cc3d', str(NumpyImport()) ],
extra_compile_args=extra_compile_args,
)
],
author="William Silversmith",
author_email="ws9@princeton.edu",
packages=setuptools.find_packages(),
package_data={
'cc3d': [
'COPYING',
'COPYING.LESSER',
],
},
description="Connected components on discrete and continuous multilabel 3D and 2D images. Handles 26, 18, and 6 connected variants; periodic boundaries (4, 8, & 6).",
long_description=read('README.md'),
long_description_content_type="text/markdown",
license = "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
keywords = "connected-components CCL volumetric-data numpy connectomics image-processing biomedical-image-processing decision-tree union-find sauf 2d 3d",
url = "https://github.com/seung-lab/connected-components-3d/",
classifiers=[
"Intended Audience :: Developers",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Intended Audience :: Science/Research",
"Operating System :: POSIX",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows :: Windows 10",
],
)