-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
126 lines (116 loc) · 4.56 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#!/usr/bin/env python
import sys
import os
# setup.py largely based on
# http://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
# Also see Jeet Sukumaran's DendroPy
###############################################################################
# setuptools/distutils/etc. import and configuration
try:
import ez_setup
try:
ez_setup_path = " ('" + os.path.abspath(ez_setup.__file__) + "')"
except OSError:
ez_setup_path = ""
sys.stderr.write("using ez_setup%s\n" % ez_setup_path)
ez_setup.use_setuptools()
import setuptools
try:
setuptools_path = " ('" + os.path.abspath(setuptools.__file__) + "')"
except OSError:
setuptools_path = ""
sys.stderr.write("using setuptools%s\n" % setuptools_path)
from setuptools import setup, find_packages
except ImportError as e:
sys.stderr.write("using distutils\n")
from distutils.core import setup
sys.stderr.write("using canned package list\n")
PACKAGES = ['peyotl',
'peyotl.api',
'peyotl.nexson_syntax',
'peyotl.nexson_validation',
'peyotl.ott',
'peyotl.phylesystem',
'peyotl.string',
'peyotl.sugar',
'peyotl.test',
'peyotl.test.support',
'peyotl.utility',
]
EXTRA_KWARGS = {}
else:
sys.stderr.write("searching for packages\n")
PACKAGES = find_packages()
EXTRA_KWARGS = dict(
include_package_data=True,
test_suite="peyotl.test"
)
EXTRA_KWARGS["zip_safe"] = False
ENTRY_POINTS = {}
EXTRA_KWARGS['scripts'] = ['scripts/nexson/validate_ot_nexson.py',
'scripts/nexson/nexson_newick.py',
'scripts/nexson/nexson_nexml.py',
'scripts/phylesystem/ot_phylesystem_list_property_values.py',
'scripts/phylesystem/ot_phylesystem_list_study_filepaths.py',
'scripts/phylesystem/ot_phylesystem_list_otu_edited_labels.py',
'scripts/ot_taxon_report',
'scripts/clipeyotl.py',
]
###############################################################################
# setuptools/distuils command extensions
try:
from setuptools import Command
except ImportError:
sys.stderr.write("setuptools.Command could not be imported: setuptools extensions not available\n")
else:
sys.stderr.write("setuptools command extensions are available\n")
command_hook = "distutils.commands"
ENTRY_POINTS[command_hook] = []
###########################################################################
# coverage
###########################################################################
# coverage
try:
from peyotl.test.support import coverage_analysis
if coverage_analysis.PEYOTL_COVERAGE_ANALYSIS_AVAILABLE:
sys.stderr.write("coverage analysis available ('python setup.py coverage')\n")
ENTRY_POINTS[command_hook].append("coverage = peyotl.test.support.coverage_analysis:CoverageAnalysis")
else:
assert False
except:
sys.stderr.write("coverage analysis not available\n")
setup(
name='peyotl',
version='0.1.4dev', # sync with __version__ in peyotl/__init__.py
description='Library for interacting with Open Tree of Life resources',
long_description=(open('README.rst').read()),
url='https://github.com/OpenTreeOfLife/peyotl',
license='BSD',
author='Emily Jane B. McTavish and Mark T. Holder',
py_modules=['peyotl'],
install_requires=['setuptools',
'anyjson',
'coverage',
'sh>=1.08',
'locket>=0.1.1',
'requests>=2.2.1',
'redis',
'enum34==1.1.10; python_version < "3.4"',
'argcomplete',
'python-dateutil', ],
packages=PACKAGES,
entry_points=ENTRY_POINTS,
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.3',
'Topic :: Scientific/Engineering :: Bio-Informatics',
],
**EXTRA_KWARGS
)