forked from neherlab/ffpopsim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
88 lines (71 loc) · 3.26 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
# vim: fdm=indent
'''
author: Richard Neher, Fabio Zanini
date: 23/08/12
license: GPL3
content: Distutils setup script for the Python bindings of FFPopSim.
If your compiler has problems finding GSL and/or BOOST and you are
sure they are installed on your system, check the section
PLATFORM-DEPENDENT OPTIONS below.
*Note*: this file is called by the Makefile with the command
python setup.py build_ext
to build the C++/Python extension. It can, however, also be called
directly including with other commands such as
python setup.py install
to install the Python bindings of FFPopSim on the system. Note that
calling this file directly does not clean the 'build' folder.
'''
from distutils.core import setup, Extension
from numpy import distutils as npdis
############################################################################
# #
# PLATFORM-DEPENDENT OPTIONS #
# #
############################################################################
# Please add your include folders to the following list, where the compiler
# can find GSL, BOOST, and Python 2.7 headers.
includes = ['/usr/include', '/usr/local/include', '/opt/local/include']
# Please add your shared library folders to the following list, where the linker
# can find GSL and Python 2.X
library_dirs = []
############################################################################
# !! DO NOT EDIT BELOW THIS LINE !! #
############################################################################
VERSION = '2.0'
SRCDIR = 'src'
PYBDIR = SRCDIR+'/python'
includes = includes + npdis.misc_util.get_numpy_include_dirs()
libs = ['gsl', 'gslcblas']
# Auxiliary functions
def read(fname):
import os
return open(os.path.join(os.path.dirname(__file__), fname)).read()
# Setup
setup(name='FFPopSim',
author='Fabio Zanini, Richard Neher',
author_email='[email protected], [email protected]',
description='C++/Python library for population genetics.',
long_description=read('README.md'),
license='GPL3',
url='http://webdav.tuebingen.mpg.de/ffpopsim/',
version=VERSION,
package_dir={'': PYBDIR},
# This is the pure Python file
py_modules=['FFPopSim'],
# This is the C++ extension
ext_modules=[Extension('_FFPopSim',
sources=[PYBDIR+'/FFPopSim_wrap.cpp',
SRCDIR+'/haploid_highd.cpp',
SRCDIR+'/haploid_lowd.cpp',
SRCDIR+'/hivpopulation.cpp',
SRCDIR+'/hivgene.cpp',
SRCDIR+'/rootedTree.cpp',
SRCDIR+'/multiLocusGenealogy.cpp',
SRCDIR+'/hypercube_lowd.cpp',
SRCDIR+'/hypercube_highd.cpp'],
include_dirs=includes,
library_dirs=library_dirs,
libraries=libs,
),
]
)