forked from wormtable/wormtable
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
72 lines (61 loc) · 2.28 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
import re
import sys
from distutils.core import setup, Extension
# Following the recommendations of PEP 396 we parse the version number
# out of the module.
def parse_version(module_file):
"""
Parses the version string from the specified file.
This implementation is ugly, but there doesn't seem to be a good way
to do this in general at the moment.
"""
f = open(module_file)
s = f.read()
f.close()
match = re.findall("__version__ = '([^']+)'", s)
return match[0]
f = open("README.txt")
wormtable_readme = f.read()
f.close()
wormtable_version = parse_version("wormtable/__init__.py")
_wormtable_module = Extension('_wormtable',
sources = ["_wormtablemodule.c", "halffloat.c"],
libraries = ["db"])
requirements = []
v = sys.version_info[:2]
if v < (2, 7) or v == (3, 0) or v == (3, 1):
requirements.append("argparse")
setup(
name = "wormtable",
version = wormtable_version,
description = "Write-once read-many data sets using Berkeley DB.",
author = "Jerome Kelleher, Dan Halligan, Rob Ness",
author_email = "[email protected]",
url = "http://pypi.python.org/pypi/wormtable",
keywords = ["Berkeley DB", "VCF", "Variant Call Format", "Bioinformatics"],
license = "GNU LGPLv3+",
platforms = ["POSIX"],
classifiers = [
"Programming Language :: C",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Development Status :: 4 - Beta",
"Environment :: Other Environment",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"Operating System :: POSIX",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Bio-Informatics",
],
requires = requirements,
long_description = wormtable_readme,
ext_modules = [_wormtable_module],
packages = ['wormtable'],
scripts = ["scripts/vcf2wt", "scripts/wtadmin", "scripts/gtf2wt"]
)