forked from TissueMAPS/JtLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
110 lines (97 loc) · 3 KB
/
Copy pathsetup.py
File metadata and controls
110 lines (97 loc) · 3 KB
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
#!/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
# 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 find_scripts():
return [s for s in setuptools.findall('bin/')
if os.path.splitext(s)[1] != '.pyc']
def get_version():
src_path = os.path.join(
os.path.abspath(os.path.dirname(__file__)), 'src', 'python'
)
sys.path = [src_path] + sys.path
import jtlib
return jtlib.__version__
setuptools.setup(
name='jtlibrary',
version=get_version(),
description='Jterator library.',
author='Markus D. Herrmann',
url='https://github.com/tissuemaps/jtlibrary',
platforms=['Linux', 'MacOS'],
classifiers=[
'Topic :: Scientific/Engineering :: Image Recognition',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: System :: Emulators',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Programming Language :: Python',
'Development Status :: 4 - Beta',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS'
],
scripts=[],
packages=setuptools.find_packages(os.path.join('src', 'python')),
package_dir={'': 'src/python'},
include_package_data=True,
install_requires=[
'numpy>=1.12.0',
'pandas>=0.19.2',
'scipy>=0.16.0',
'cached-property>=1.3.0',
'cython>=0.24',
'opencv-contrib-python>=3.2',
'scikit-image>=0.11.3',
'mahotas>=1.4.0',
'centrosome>=1.0.5',
'colorlover>=0.2.1',
'plotly>=2.0.0',
'pyasn1>=0.1.9',
'pytest>=2.8.2',
'ndg-httpsclient>=0.4.0',
'sep>=1.0.0',
'simpleitk>=1.0.0'
],
setup_requires=[
'numpy>=1.12.0',
'cython>=0.24'
]
)