-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
72 lines (62 loc) · 2.45 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import codecs
from setuptools import setup, find_packages
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
# Add your dependencies in requirements.txt
# Note: you can add test-specific requirements in tox.ini
requirements = []
with open('requirements.txt') as f:
for line in f:
stripped = line.split("#")[0].strip()
if len(stripped) > 0:
requirements.append(stripped)
# https://github.com/pypa/setuptools_scm
use_scm = {"write_to": "elastix_napari/_version.py"}
setup(
name='elastix-napari',
author='Viktor van der Valk',
author_email='[email protected]',
license='Apache Software License 2.0',
url='https://github.com/SuperElastix/elastix-napari',
description='A toolbox for rigid and nonrigid registration of images.',
long_description=read('README.md'),
long_description_content_type='text/markdown',
packages=find_packages(),
python_requires='>=3.8',
install_requires=requirements,
version=get_version("elastix_napari/__init__.py"),
setup_requires=['setuptools_scm'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Framework :: napari',
'Topic :: Software Development :: Testing',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Operating System :: OS Independent',
'License :: OSI Approved :: Apache Software License',
],
project_urls={
'Project Site': 'https://elastix.lumc.nl/',
'Bug Tracker': 'https://github.com/SuperElastix/elastix-napari/issues',
'Source Code': 'https://github.com/SuperElastix/elastix-napari',
'User Support': 'https://groups.google.com/g/elastix-imageregistration',
},
entry_points={'napari.manifest': ['elastix-napari = elastix_napari:napari.yaml']},
package_data={'elastix_napari': ['napari.yaml']}
)