This repository has been archived by the owner on Aug 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
executable file
·103 lines (89 loc) · 2.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
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
''' distribute- and pip-enabled setup.py '''
from __future__ import print_function
import os
import re
import sys
import glob
import logging
import shutil
logger = logging.getLogger(__name__)
# ----- control flags -----
# fallback to setuptools if distribute isn't found
setup_tools_fallback = True
# don't include subdir named 'tests' in package_data
skip_tests = False
# print some extra debugging info
debug = True
# -------------------------
if debug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.INFO)
# distribute import and testing
try:
import distribute_setup
distribute_setup.use_setuptools()
logger.info("distribute_setup.py imported and used")
except ImportError:
# falback to setuptools?
# distribute_setup.py was not in this directory
if not (setup_tools_fallback):
import setuptools
if not (hasattr(setuptools, '_distribute')
and setuptools._distribute):
raise ImportError("distribute was not found and fallback to "
"setuptools was not allowed")
else:
logger.debug("distribute_setup.py not found, defaulted to "
"system distribute")
else:
logger.debug("distribute_setup.py not found, defaulting to system "
"setuptools")
import setuptools
def get_version():
src_path = os.path.join(
os.path.abspath(os.path.dirname(__file__)), 'src', 'python', 'tmclient'
)
sys.path = [src_path] + sys.path
import version
return version.__version__
setuptools.setup(
name='tmclient',
version=get_version(),
description='RESTful API client for TissueMAPS.',
author='Markus D. Herrmann',
license='Apache-2.0',
url='https://github.com/tissuemaps/tmclient',
platforms=['Linux', 'MacOS', 'Windows'],
classifiers=[
'License :: OSI Approved :: Apache Software License',
'Operating System :: MacOS',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Internet :: WWW/HTTP',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Development Status :: 4 - Beta'
],
entry_points={
'console_scripts': [
'tm_client = tmclient.api:TmClient.__main__',
]
},
packages=setuptools.find_packages(os.path.join('src', 'python')),
package_dir={'': os.path.join('src', 'python')},
package_data={'': ['*.rst']},
include_package_data=True,
install_requires=[
'opencv-contrib-python>=3.2',
'pandas>=0.19.1',
'prettytable>=0.7.2',
'PyYAML>=3.11',
'requests>=2.11.0'
]
)