-
Notifications
You must be signed in to change notification settings - Fork 12
/
setup.py
112 lines (95 loc) · 3.33 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
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2019--, Cell2cell development team.
#
# Distributed under the terms of the BSD 3-Clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
from setuptools.command.egg_info import egg_info
from setuptools.command.develop import develop
from setuptools.command.install import install
import re
import ast
import os
from setuptools import find_packages, setup
# Dealing with Cython
USE_CYTHON = os.environ.get('USE_CYTHON', False)
ext = '.pyx' if USE_CYTHON else '.c'
def custom_command():
import sys
if sys.platform in ['darwin', 'linux']:
os.system('pip install numpy')
class CustomInstallCommand(install):
def run(self):
install.run(self)
custom_command()
class CustomDevelopCommand(develop):
def run(self):
develop.run(self)
custom_command()
class CustomEggInfoCommand(egg_info):
def run(self):
egg_info.run(self)
custom_command()
extensions = [
]
if USE_CYTHON:
from Cython.Build import cythonize
extensions = cythonize(extensions)
classes = """
Development Status :: 2 - Pre-Alpha
License :: OSI Approved :: BSD License
Topic :: Software Development :: Libraries
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Bio-Informatics
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Operating System :: Unix
Operating System :: POSIX
Operating System :: MacOS :: MacOS X
"""
classifiers = [s.strip() for s in classes.split('\n') if s]
description = ('TBD')
with open('README.md') as f:
long_description = f.read()
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('cell2cell/__init__.py', 'rb') as f:
hit = _version_re.search(f.read().decode('utf-8')).group(1)
version = str(ast.literal_eval(hit))
setup(name='cell2cell',
version=version,
license='BSD-3-Clause',
description=description,
long_description_content_type="text/markdown",
long_description=long_description,
author="cell2cell development team",
author_email="[email protected]",
maintainer="cell2cell development team",
maintainer_email="[email protected]",
packages=find_packages(),
ext_modules=extensions,
install_requires=['numpy >= 1.16',
'pandas >= 1.0.0',
'xlrd >= 1.1',
'openpyxl >= 2.6.2',
'networkx >= 2.3',
'matplotlib >= 3.2.0',
'seaborn >= 0.11.0',
'scikit-learn',
'umap-learn',
'tqdm',
'statsmodels',
'statannotations',
'tensorly == 0.8.1',
'kneed',
'scanpy',
'gseapy == 1.0.3'
],
classifiers=classifiers,
entry_points={},
package_data={},
cmdclass={'install': CustomInstallCommand,
'develop': CustomDevelopCommand,
'egg_info': CustomEggInfoCommand, },
zip_safe=False)