-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
100 lines (85 loc) · 3.66 KB
/
Copy pathsetup.py
File metadata and controls
100 lines (85 loc) · 3.66 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
#!/usr/bin/python
#Last-modified: 24 Mar 2015 01:56:04 PM
# Module/Scripts Description
#
# Copyright (c) 2008 Yunfei Wang <Yunfei.Wang1@utdallas.edu>
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the BSD License (see the file COPYING included with
# the distribution).
#
# @status: experimental
# @version: 1.0.0
# @author: Yunfei Wang
# @contact: Yunfei.Wang1@utdallas.edu
# ------------------------------------
# python modules
# ------------------------------------
import os,sys
import string
from setuptools import setup, find_packages, Extension
# ------------------------------------
# constants
# ------------------------------------
EXTERNAL = ['RNAlib']
# ------------------------------------
# Misc functions
# ------------------------------------
# ------------------------------------
# Classes
# ------------------------------------
# ------------------------------------
# Main
# ------------------------------------
if __name__ == '__main__':
if sys.version[:3] != '2.7':
sys.stderr.write("CRITICAL: Python version must be 2.7!\n")
sys.exit(1)
# includepy = "%s/include/python%s" % (sys.prefix, sys.version[:3])
with open("README",'r') as fh:
long_description = fh.read()
# PROG and VERSION
with open('VERSION','r') as fh:
PROG, VERSION = fh.next().split()
# Compile external lib
if 'clean' in sys.argv:
for elib in EXTERNAL:
print >>sys.stderr, "Clean {0} Package ...".format(elib)
os.system('cd external/{0} && make clean && cd ../..'.format(elib))
print >>sys.stderr, "Clean dist and egg info ..."
os.system('if [ -d dist ]; then rm -rf dist; fi')
os.system('if [ -f {0}.egg-info ]; then rm {1}.egg-info; fi'.format(PROG,PROG))
os.system('if [ -d {0}.egg-info ]; then rm -rf {1}.egg-info; fi'.format(PROG,PROG))
else:
for elib in EXTERNAL:
print >>sys.stderr, "Compile {0} Package ...".format(elib)
os.system('cd external/{0} && make && cd ../..'.format(elib))
# install requirement
install_requires = [ "fisher >= 0.1.4",
"ngslib>=1.1.10",
"numpy >= 1.4.1"]
setup(name=PROG,
version=VERSION,
author='Yunfei Wang',
author_email='yfwang0405@gmail.com',
url='http://http://rsqwiki.appspot.com',
license="GNU General Public License (GPL)",
keywords = "Python, RNA structure prediction, fold",
description = ("Python Package for RNA structurome quantification analysis."),
long_description = long_description,
package_dir={PROG:'src'},
packages = [PROG],
scripts=['bin/'+PROG,
'bin/wProfileExtraction.py',
'bin/wCleanTranscriptome.py',
'bin/wTransGrouping.py'],
ext_modules=[Extension('wRNA',['external/RNAlib/wRNA/wRNA.cpp'],extra_link_args=['-lm','external/RNAlib/libRNA.a'],extra_compile_args='-w -shared -fPIC -p -Iexternal/RNAlib/fold -Iexternal/RNAlib/plot -Iexternal/RNAlib/wRNA'.split(' '))],
classifiers=['Environment :: Console',
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL)',
'License :: Free for non-commercial use',
'Operating System :: Unix',
'Programming Language :: Python :: 2.7',
'Topic :: Scientific/Engineering :: Bio-Informatics'],
install_requires=install_requires)