forked from jeromekelleher/discsim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
66 lines (55 loc) · 1.9 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
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")
discsim_readme = f.read()
f.close()
discsim_version = parse_version("discsim.py")
d = "lib/"
_discsim_module = Extension('_discsim',
sources = ["_discsimmodule.c", d + "util.c", d + "sim.c", d + "avl.c",
d + "nystrom.c"],
libraries = ["gsl", "gslcblas"],
include_dirs = [d])
requirements = ["ercs"]
setup(
name = "discsim",
version = discsim_version,
description = "Efficient coalescent simulation in continuous space",
author = "Jerome Kelleher",
author_email = "jerome.kelleher@ed.ac.uk",
url = "http://pypi.python.org/pypi/discsim",
keywords = ["Coalescent simulation", "Continuous space"],
license = "GNU GPLv3",
platforms = ["POSIX"],
classifiers = [
"Programming Language :: C",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta",
"Environment :: Other Environment",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Bio-Informatics",
],
requires = requirements,
long_description = discsim_readme,
ext_modules = [_discsim_module],
py_modules = ['discsim'],
)