-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
86 lines (74 loc) · 2.45 KB
/
setup.py
File metadata and controls
86 lines (74 loc) · 2.45 KB
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
import io
import os
import sys
from distutils import sysconfig
import numpy as np
from Cython.Build import cythonize
from Cython.Distutils import build_ext
from setuptools import setup, Extension
ROOT = os.path.dirname(__file__)
def get_version():
# Borrowed this method from pysam
sys.path.insert(0, "segmentation")
# noinspection PyUnresolvedReferences,PyPackageRequirements
import version
return version.__version__
with io.open(os.path.join(ROOT, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
includes = [np.get_include(), sysconfig.get_config_var('INCLUDEDIR'), os.path.join(ROOT, 'src')]
CFLAGS = ['-Ofast']
setup(
name="segmentation",
packages=["segmentation"],
version=get_version(),
description='Mixture model segmentation',
long_description=long_description,
long_description_content_type='text/markdown',
author='Matej Usaj',
author_email='m.usaj@utoronto.ca',
url='https://github.com/usajusaj/segmentation',
download_url='https://github.com/usajusaj/segmentation/archive/master.zip',
keywords=['mixture', 'model', 'segmentation'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
setup_requires=[
'cython',
'numpy'
],
install_requires=[
'numpy',
'scipy',
'scikit-image'
],
entry_points={
'console_scripts': [
'segment=segmentation.cli:main',
],
},
cmdclass={"build_ext": build_ext},
ext_modules=cythonize([
Extension(
name="segmentation.segmentation",
language="c++",
sources=[
"segmentation/segmentation.pyx",
"src/fastmm.cpp",
],
define_macros=[('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION')], # suppress annoying compile warnings
include_dirs=includes,
extra_compile_args=CFLAGS,
extra_link_args=CFLAGS
)
])
)