-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·94 lines (76 loc) · 3.18 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
#!/usr/bin/env python
import sys
import os
## Some of the fortran files require atlas
## Most builds will use the available shared libraries
## but some need the static libraries.
# this works for ubuntu using libatlas-base-dev
# also libatlas3gf-sse
#atlas_libs = ['lapack_atlas','blas']
atlas_libs = ['atlas','lapack','f77blas','cblas']
extra_link_args = []
## you might need this if you aren't
## using gfortran as a fortran compiler
#libs = ['gfortran']
libs = []
library_dirs=["/opt/sw/fw/rsc/atlas/3.9.25//lib/"]
#library_dirs=["/usr/lib/sse2/atlas","/usr/lib/sse2/"]
#library_dirs=['/usr/lib64/atlas/']
#######################################################
# #
# Building using Static atlas libraries... #
# #
#######################################################
# ATLASLIB="/opt/sw/fw/rsc/atlas/3.8.3/lib/"
# extra_link_args=[""" {0}/liblapack.a {0}/libcblas.a \
# {0}/libf77blas.a {0}/libatlas.a \
# -lgfortran """.format(ATLASLIB) ]
#atlas_libs = []
## scypy_distutils Script
from numpy.distutils.core import setup, Extension
## setup the python module
setup(name = "pymcmc", # name of the package to import later,
version = '1.0',
description = """A python package for Bayesian estimation \
using Markov chain Monte Carlo""",
author = "Christopher Strickland",
author_email = '[email protected]',
license = "GNU GPLv3",
## Build fortran wrappers, uses f2py
ext_modules = [Extension('stochsearch',
['Src/stochsearch.f'],
libraries=atlas_libs,
library_dirs = library_dirs,
extra_link_args=extra_link_args,
),
Extension('timeseriesfunc',
['Src/timeseriesfunc.f'],
libraries=libs,
extra_link_args=[],
),
Extension('wishart',
['Src/wishart.f'],
libraries=atlas_libs,
library_dirs = library_dirs,
extra_link_args=extra_link_args,
)
],
package_dir={'pymcmc':'Lib'},
data_files=[(os.path.join('pymcmc','examples'),
['examples/ex_loglinear.py',
'examples/ex_AR1.py',
'examples/ex_variable_selection.py',
'examples/ex_loglinear_loop.py',
'examples/ex_loglinear_f2py.py',
'examples/ex_loglinear_weave.py',
'examples/loglinear.f',
'examples/matplotlibrc']),
(os.path.join('pymcmc','data'),
['data/count.txt',
'data/yld2.txt']),
(os.path.join('pymcmc','doc'),
['doc/PyMCMC.lyx',
'doc/PyMCMC.tex',
'doc/PyMCMC.pdf'])],
packages = ["pymcmc"],
)