-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsetup.py
executable file
·75 lines (65 loc) · 2.54 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
from setuptools import find_packages, setup
from distutils.extension import Extension
import os
import glob
# catch ImportError during the readthedocs build.
try:
from Cython.Build import cythonize
ext_modules = [Extension("*", [fname],
extra_compile_args=["-std=c++11"], language='c++')
for fname in glob.glob('syconn/*/*.pyx', recursive=True)]
cython_out = cythonize(ext_modules, compiler_directives={
'language_level': 3, 'boundscheck': False,
'wraparound': False, 'initializedcheck': False,
'cdivision': False, 'overflowcheck': True})
except ImportError as e:
print("WARNING: Could not build cython modules. {}".format(e))
cython_out = None
VERSION = '2.0'
def read_readme():
readme_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'README.md')
with open(readme_file) as f:
readme = f.read()
return readme
def write_version_py(filename='syconn/version.py'):
content = """# THIS FILE IS GENERATED FROM SYCONN SETUP.PY
#
version = '%(version)s'
"""
with open(filename, 'w') as f:
f.write(content % {'version': VERSION})
write_version_py()
setup(
name='SyConn',
version=VERSION,
description='Analysis pipeline for EM raw data based on deep and '
'supervised learning to extract high level biological'
'features and connectivity.',
long_description=read_readme(),
long_description_content_type='text/markdown',
url='https://structuralneurobiologylab.github.io/SyConn/',
download_url='https://github.com/StructuralNeurobiologyLab/SyConn.git',
author='Philipp Schubert et al.',
author_email='pschubert@neuro.mpg.de',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Topic :: Connectomics :: Analysis Tools',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
platforms=["Linux", ],
keywords='connectomics machinelearning imageprocessing',
packages=find_packages(exclude=['scripts', 'tests', 'examples']),
python_requires='>=3.6, <4',
package_data={'syconn': ['handler/config.yml']},
include_package_data=True,
tests_require=['pytest', 'pytest-cov'],
ext_modules=cython_out,
entry_points={
'console_scripts': [
'syconn.server=syconn.analysis.server:main'
],
},
)