-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
64 lines (57 loc) · 1.84 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
#!/usr/bin/env python
from setuptools import setup
from setuptools import find_packages
from os.path import join as opj
from os.path import dirname
def get_version():
"""Load version only
"""
with open(opj(dirname(__file__), 'ants_seg_to_nidm', '__init__.py')) as f:
version_lines = list(filter(lambda x: x.startswith('__version__'), f))
assert (len(version_lines) == 1)
return version_lines[0].split('=')[1].strip(" '\"\t\n")
# extension version
version = get_version()
PACKAGES = find_packages()
README = opj(dirname(__file__), 'README.md')
try:
import pypandoc
long_description = pypandoc.convert(README, 'rst')
except (ImportError, OSError) as exc:
print(
"WARNING: pypandoc failed to import or threw an error while converting"
" README.md to RST: %r .md version will be used as is" %exc
)
long_description = open(README).read()
# Metadata
setup(
name='ants_seg_to_nidm',
version=version,
description='ANTS segmentation data to NIDM / jsonld',
long_description=long_description,
author='David Keator',
author_email='[email protected]',
url='https://github.com/dbkeator/ants_seg_to_nidm',
packages=PACKAGES,
install_requires=[
'numpy',
'pynidm',
'pandas',
], # Add requirements as necessary
include_package_data=True,
extras_require={
'devel-docs': [
# for converting README.md -> .rst for long description
'pypandoc',
]},
entry_points={
'console_scripts': [
'antsegstats2nidm=ants_seg_to_nidm.ants_seg_to_nidm:main' # this is where the console entry points are defined
],
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
], # Change if necessary
)