1
2
3 from distutils.command.install import INSTALL_SCHEMES
4 for scheme in INSTALL_SCHEMES.values():
5 scheme['data'] = scheme['purelib']
6
7
8 try:
9 import setuptools
10 import bdist_mpkg
11 except ImportError:
12 pass
13
14
15 import scipy
16 if hasattr(scipy, 'Numeric'):
17
18 import scipy_distutils.core as core
19 data_files = [('SloppyCell/ReactionNetworks',
20 ['ReactionNetworks/f2py_signatures.pyf',
21 'ReactionNetworks/mtrand.h',
22 'ReactionNetworks/mtrand.c'])]
23 else:
24
25 import numpy.distutils.core as core
26
27 from numpy.distutils.misc_util import Configuration
28
29
30
31 config = Configuration('SloppyCell')
32 config.add_data_files('ReactionNetworks/f2py_signatures.pyf',
33 'ReactionNetworks/mtrand.h',
34 'ReactionNetworks/mtrand.c')
35 config.add_data_dir('Doc')
36 config.add_data_dir('ddaskr')
37 config.add_data_dir('Example')
38 data_files = config.todict()['data_files']
39
40
41
42
43
44
45
46
47
48 import os
49 if hasattr(os, 'link'):
50 del os.link
51
52
53
54
55 daskr = core.Extension(name = 'SloppyCell._daskr',
56 sources = ['daskr.pyf', 'ddaskr/ddaskr.f',
57 'ddaskr/daux.f', 'ddaskr/dlinpk.f'])
58
59 misc_c = core.Extension(name = 'SloppyCell.misc_c',
60 sources = ['misc_c.c', 'misc_c.pyf'])
61
62 core.setup(name='SloppyCell',
63 version='CVS',
64 author='Ryan Gutenkunst',
65 author_email='rng7@cornell.edu',
66 url='http://sloppycell.sourceforge.net',
67 packages=['SloppyCell',
68 'SloppyCell.ReactionNetworks',
69 'SloppyCell.Testing',
70 'SloppyCell.ExprManip',
71 'SloppyCell.Vandermonde',
72 ],
73 package_dir={'SloppyCell': ''},
74 data_files=data_files,
75
76 ext_modules = [daskr, misc_c]
77 )
78