forked from voxelmorph/voxelmorph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·52 lines (46 loc) · 1.43 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
#!/usr/bin/env python
import re
import pathlib
import setuptools
setuptools.dist.Distribution().fetch_build_eggs(['packaging'])
from packaging.version import InvalidVersion, parse
# base source directory
base_dir = pathlib.Path(__file__).parent.resolve()
# extract the current version
init_file = base_dir.joinpath('voxelmorph/__init__.py')
init_text = open(init_file, 'rt').read()
pattern = r"^__version__ = ['\"]([^'\"]*)['\"]"
match = re.search(pattern, init_text, re.M)
if not match:
raise RuntimeError(f'Unable to find __version__ in {init_file}.')
version = match.group(1)
try:
version_obj = parse(version)
except InvalidVersion:
raise RuntimeError(f'Invalid version string {version}.')
# run setup
setuptools.setup(
name='voxelmorph',
version=version,
license='Apache 2.0',
description='Image Registration with Convolutional Networks',
url='https://github.com/voxelmorph/voxelmorph',
keywords=['deformation', 'registration', 'imaging', 'cnn', 'mri'],
packages=setuptools.find_packages(),
python_requires='>=3.6',
classifiers=[
'Intended Audience :: Science/Research',
'Programming Language :: Python :: 3',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
],
install_requires=[
'packaging',
'scikit-image',
'h5py',
'numpy',
'scipy',
'nibabel',
'neurite>=0.2',
]
)