-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
66 lines (54 loc) · 1.92 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
#! /usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os
from pkg_resources import parse_requirements, RequirementParseError
with open('README.md') as readme_file:
readme = readme_file.read()
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
setup(name='nucleicuts',
version='0.1.0',
description='Graph-cut algorithm for nuclei segmentation',
author='Kitware, Inc.',
author_email='lee.cooper@emory.edu',
url='https://github.com/cooperlab/NucleiCuts',
packages=['nucleicuts'],
package_dir={'nucleicuts': 'nucleicuts'},
include_package_data=True,
install_requires=requirements,
license=license_str,
zip_safe=False,
keywords='nucleicuts',
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',
],
)