-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathsetup.py
More file actions
119 lines (111 loc) · 3.13 KB
/
setup.py
File metadata and controls
119 lines (111 loc) · 3.13 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
111
112
113
114
115
116
117
118
119
#!/usr/bin/env python3
from setuptools import setup, find_packages, Extension
import os
import io
import re
import sys
try:
import numpy
except ModuleNotFoundError as e:
#raise ModuleNotFoundError(
print(
"Please install numpy before installing Camoco,"
)
sys.exit(1)
def read(*names, **kwargs):
with io.open(
os.path.join(os.path.dirname(__file__), *names),
encoding=kwargs.get("encoding", "utf8")
) as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
pccup = Extension(
'camoco.PCCUP',
sources=['camoco/PCCUP.pyx'],
include_dirs=[numpy.get_include()]
)
refgendist = Extension(
'camoco.RefGenDist',
sources=['camoco/RefGenDist.pyx'],
include_dirs=[numpy.get_include()]
)
# Check if running Windows or OSX
if (
not sys.platform.startswith('linux')
and int(os.environ.get('CAMOCO_FORCE_INSTALL',default='0')) != 1
):
print(
"Sorry! Camoco is not currently supported on non-linux systems "
"If you would like to proceed with installation please set the "
"ENV variable 'CAMOCO_FORCE_INSTALL' to '1'"
)
sys.exit(1)
setup(
name = 'camoco',
version = find_version('camoco','__init__.py'),
packages = find_packages(),
scripts = [
'camoco/cli/camoco'
],
ext_modules = [pccup,refgendist],
cmdclass = {
},
package_data = {
'':['*.cyx']
},
python_requires='>=3.8',
setup_requires = [
# Setuptools 18.0 properly handles Cython extensions.
'setuptools>=18.0',
'numpy>=1.14.5',
'cython>=0.29.10',
],
install_requires = [
'minus80>=1.0.0',
'cython>=0.29.10',
'igraph==0.1.11',
'pyyaml>=5.1.1',
'matplotlib>=3.1.0',
'numpy>=1.16.4',
'scipy>=1.2.1',
'pandas==0.23.4',
'fa2>=0.3.5',
'scikit-learn>=0.21.2',
'statsmodels>=0.8.0',
'termcolor>=1.1.0',
'powerlaw>=1.4.6',
'flask==2.3.2',
'markov-clustering>=0.0.6.dev0',
'fastcluster>=1.1.25',
'bcolz>=1.2.1',
'psutil>=5.6.3',
'odo>=0.5.0',
'blaze>=0.10.1'
],
extras_require={
'docs' : [
'ipython>=6.5.0',
'matplotlib>=2.2.3',
'numpydoc',
'sphinx_materialdesign_theme',
'sphinx_rtd_theme',
'sphinxcontrib-programoutput'
]
},
dependency_links = [
#'git+https://github.com/LinkageIO/Minus80'
#'git+https://github.com/rogerbinns/apsw'
],
include_package_data=True,
author = 'Rob Schaefer',
author_email = 'rob@linkage.io',
description = 'Library for Co-Analysis of Molecular Componenets.',
license = "Copyright Linkage Analytics 2017, Available under the MIT License",
url = 'https://github.com/schae234/camoco'
)