forked from usnistgov/mosaic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·179 lines (157 loc) · 4.55 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
from setuptools import setup, Command
import mosaic
import os
import sys
import nose
from tests.mosaicUnitTests import _mosaicUnitTests
class mosaicBinaries(Command):
description = "build MOSAIC binaries."
user_options = [
('inplace', 'i', "build binaries in the current branch"),
]
def initialize_options(self):
self.inplace=0
def finalize_options(self):
pass
def run(self):
retval=0
if not self.inplace:
retval = os.system("git checkout master")
if retval==0:
os.system('sh .scripts/pyinstaller-sh')
class mosaicDependencies(Command):
description = "install MOSAIC dependencies."
user_options = [
('upgrade', 'u', "force packages to upgrade"),
]
def initialize_options(self):
self.upgrade=0
def finalize_options(self):
pass
def run(self):
# os.system('sh .scripts/build-deps-sh')
if self.upgrade:
os.system('pip install -r requirements.txt --upgrade')
else:
os.system('pip install -r requirements.txt')
class mosaicDocumentationDependencies(Command):
description = "install dependencies for Sphinx documentation."
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
os.system('sh .scripts/build-docs-deps-sh')
class mosaicAddons(Command):
description = "install MOSAIC addons (Mathematica, Igor and Matlab scripts)."
user_options = [
('mathematica', 'm', "install Mathematica scripts"),
('igor', 'i', "install IGOR SQLite drivers")
]
def initialize_options(self):
self.mathematica = 0
self.igor = 0
def finalize_options(self):
pass
def run(self):
if self.mathematica:
os.system('sh .scripts/install-addons-sh ')
elif self.igor:
os.system( 'sh .scripts/install-igor-addons-sh' )
else:
os.system('sh .scripts/install-addons-sh ')
os.system( 'sh .scripts/install-igor-addons-sh' )
class mosaicDocs(Command):
description = "build MOSAIC documentation."
user_options = [ ('all', None, "build HTML and PDF documentation (default)"),
('html', None, "build HTML documentation"),
('pdf', None, "build PDF documentation"),
('rebuild', None, "rebuild HTML and PDF documentation"),
]
def initialize_options(self):
self.html = 0
self.pdf = 0
self.all = 0
self.rebuild = 0
self.upload = 0
def finalize_options(self):
pass
def run(self):
# always build docs in the master branch.
os.system("git checkout master")
if self.html:
os.system("make -C _nistpages html")
elif self.pdf:
os.system("make -C _nistpages latexpdf")
elif self.rebuild:
os.system("make -C _nistpages clean html latexpdf")
else:
os.system("make -C _nistpages html latexpdf")
setup(
cmdclass={
'test' : _mosaicUnitTests(Command),
'nosetests' : _mosaicUnitTests(Command),
'mosaic_tests' : _mosaicUnitTests(Command),
'mosaic_docs' : mosaicDocs,
'mosaic_bin' : mosaicBinaries,
'mosaic_deps' : mosaicDependencies,
'mosaic_docs_deps' : mosaicDocumentationDependencies,
'mosaic_addons' : mosaicAddons
},
name='mosaic-nist',
version=mosaic.__version__+'+'+mosaic.__build__,
author='Arvind Balijepalli',
author_email='[email protected]',
maintainer='Arvind Balijepalli',
maintainer_email='[email protected]',
packages=[
'mosaic',
'mosaic.filters',
'mosaic.mdio',
'mosaic.trajio',
'mosaic.process',
'mosaic.partition',
'mosaic.apps',
'mosaic.tests',
'mosaic.trajio.qdf',
'mosaic.trajio.abf',
'mosaic.utilities',
'mosaicweb',
'mosaicweb',
'mosaicweb.mosaicAnalysis',
'mosaicweb.plotlyUtils',
'mosaicweb.sessionManager',
'mosaicweb.utils'
],
scripts=[
'bin/analysis.py',
'addons/mathematica/MosaicAnalysis.m',
'addons/mathematica/MosaicUtils.m',
'addons/mathematica/Util.m',
'addons/MATLAB/openandquery.m',
'icons/icon_100px.png',
'icons/error-128.png',
'icons/warning-128.png',
'.scripts/install-addons-sh',
'.scripts/pyinstaller-sh',
'data/eventMD-PEG28-stepResponseAnalysis.sqlite',
'data/eventMD-PEG28-cusumLevelAnalysis.sqlite',
'data/.settings',
'data/SingleChan-0001.qdf',
'data/SingleChan-0001_state.txt',
'mosaicweb/mosaicweb/static/'
'commit-hash',
'version-hash',
'mweb-version-hash',
'requirements.txt',
'DISCLAIMER.TXT',
'LICENSE.TXT'
],
install_requires=open('requirements.txt').read().splitlines(),
url=mosaic.DocumentationURL,
license=open('LICENSE.rst').read(),
description='A Modular Single-Molecule Analysis Interface.',
long_description=open('README.rst').read(),
platforms=['MacOS', 'Windows', 'Linux'],
)