forked from CellProfiler/centrosome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
113 lines (96 loc) · 2.91 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import Cython.Build
import pkg_resources
import setuptools
import setuptools.command.build_ext
import setuptools.command.test
import sys
class BuildExtension(setuptools.command.build_ext.build_ext):
def build_extensions(self):
numpy_includes = pkg_resources.resource_filename("numpy", "core/include")
for extension in self.extensions:
if hasattr(extension, "include_dirs") and numpy_includes not in extension.include_dirs:
extension.include_dirs.append(numpy_includes)
extension.include_dirs.append("centrosome/include")
setuptools.command.build_ext.build_ext.build_extensions(self)
class Test(setuptools.command.test.test):
user_options = [
("pytest-args=", "a", "Arguments to pass to py.test")
]
def initialize_options(self):
setuptools.command.test.test.initialize_options(self)
self.pytest_args = []
def finalize_options(self):
setuptools.command.test.test.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
setuptools.setup(
author="Allen Goodman",
author_email="[email protected]",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: C",
"Programming Language :: C++",
"Programming Language :: Cython",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 2",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering",
],
cmdclass={
"build_ext": BuildExtension,
"test": Test
},
description="An open source image processing library",
ext_modules=Cython.Build.cythonize([
setuptools.Extension(
name="_cpmorphology",
sources=[
"centrosome/src/_cpmorphology.c",
]
),
setuptools.Extension(
name="_propagate",
sources=[
"centrosome/_propagate.pyx",
],
),
setuptools.Extension(
name="*",
language="c++",
sources=[
"centrosome/*.pyx",
],
),
]),
install_requires=[
"numpy",
"pillow",
"scikit-image",
"scipy",
],
keywords="",
license="BSD",
long_description="",
name="centrosome",
packages=[
"centrosome"
],
setup_requires=[
"cython",
"numpy",
"pytest",
],
tests_require=[
"pytest",
],
url="https://github.com/CellProfiler/centrosome",
version="1.0.5",
)