forked from DigitalSlideArchive/HistomicsTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
78 lines (65 loc) · 2.28 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
76
77
78
#! /usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os
import json
from pkg_resources import parse_requirements, RequirementParseError
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
with open('plugin.json') as f:
pkginfo = json.load(f)
with open('LICENSE') as f:
license_str = f.read()
try:
with open('requirements.txt') as f:
ireqs = parse_requirements(f.read())
except RequirementParseError:
raise
requirements = [str(req) for req in ireqs]
# if not on ReadTheDocs then add requirements depending on C libraries
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd:
requirements_c_files = ['requirements_c_conda.txt',
'requirements_c.txt']
for reqfile in requirements_c_files:
try:
with open(reqfile) as f:
ireqs_c = parse_requirements(f.read())
except RequirementParseError:
raise
cur_requirements = [str(req) for req in ireqs_c]
requirements += cur_requirements
test_requirements = [
# TODO: Should we list Girder here?
]
setup(name='histomicstk',
version=pkginfo['version'],
description=pkginfo['description'],
long_description=readme + '\n\n' + history,
author='Kitware, Inc.',
author_email='[email protected]',
url='https://github.com/DigitalSlideArchive/HistomicsTK',
packages=['histomicstk'],
package_dir={'histomicstk':
'histomicstk'},
include_package_data=True,
install_requires=requirements,
license=license_str,
zip_safe=False,
keywords='histomicstk',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Environment :: Console',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Software Development :: Libraries :: Python Modules',
],
test_suite='plugin_tests',
tests_require=test_requirements)