Passed
Push — master ( 37390f...bd1a1d )
by Fernando
01:27
created

setup.is_slicer_python()   A

Complexity

Conditions 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
#!/usr/bin/env python
2
3
"""The setup script."""
4
5
from setuptools import setup, find_packages
6
7
with open('README.md', encoding='utf8') as readme_file:
8
    readme = readme_file.read()
9
10
with open('HISTORY.rst', encoding='utf8') as history_file:
11
    history = history_file.read()
12
13
requirements = [
14
    'Click',
15
    'humanize',
16
    'nibabel',
17
    'numpy',
18
    'scipy',
19
    'torch>=1.1',
20
    'torchvision',
21
    'tqdm',
22
]
23
24
25
# New versions of Slicer need SimpleITK 2, but SimpleITK is preferred
26
# because of https://github.com/SimpleITK/SimpleITK/issues/1239
27
try:
28
    import SimpleITK  # noqa: F401
29
except ImportError:
30
    requirements.append('SimpleITK<2')
31
32
33
setup(
34
    author='Fernando Perez-Garcia',
35
    author_email='[email protected]',
36
    python_requires='>=3.6',
37
    classifiers=[
38
        'Development Status :: 2 - Pre-Alpha',
39
        'Intended Audience :: Science/Research',
40
        'License :: OSI Approved :: MIT License',
41
        'Natural Language :: English',
42
        'Operating System :: OS Independent',
43
        'Programming Language :: Python :: 3.6',
44
        'Programming Language :: Python :: 3.7',
45
        'Programming Language :: Python :: 3.8',
46
    ],
47
    description=(
48
        'Tools for loading, augmenting and writing 3D medical images'
49
        ' on PyTorch.'
50
    ),
51
    entry_points={
52
        'console_scripts': [
53
            'torchio-transform=torchio.cli.apply_transform:main',
54
            'tiohd=torchio.cli.print_info:main',
55
        ],
56
    },
57
    extras_require={
58
        'plot': ['matplotlib'],
59
    },
60
    install_requires=requirements,
61
    license='MIT license',
62
    long_description=readme + '\n\n' + history,
63
    long_description_content_type='text/markdown',
64
    include_package_data=True,
65
    keywords='torchio',
66
    name='torchio',
67
    packages=find_packages(include=['torchio', 'torchio.*']),
68
    setup_requires=[],
69
    test_suite='tests',
70
    tests_require=[],
71
    url='https://github.com/fepegar/torchio',
72
    version='0.18.3',
73
    zip_safe=False,
74
)
75