Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
setup.py
1 #!/usr/bin/python
2 
3 from argparse import ArgumentParser
4 from distutils.core import setup, Extension
5 from subprocess import Popen, PIPE
6 from os.path import join as join_paths
7 from os import chmod
8 from glob import glob
9 import sys
10 import stat
11 
12 gsl_config=Popen(['gsl-config', '--prefix'], stdout=PIPE)
13 gsl_prefix=gsl_config.communicate()[0].strip()
14 
15 orbital_evolution_code=['src/Common.cpp', 'src/Functions.cpp',
16  'src/OrbitSolver.cpp', 'src/Planet.cpp',
17  'src/Star.cpp', 'src/StellarQ.cpp',
18  'src/StellarEvolution.cpp', 'src/StellarSystem.cpp',
19  'src/YRECIO.cpp', 'src/StoppingConditions.cpp',
20  'src/ExternalStoppingConditions.cpp',
21  'src/CustomStellarEvolution.cpp']
22 alglib_code=['src/alglib/src/interpolation.cpp', 'src/alglib/src/ap.cpp',
23  'src/alglib/src/alglibinternal.cpp',
24  'src/alglib/src/optimization.cpp', 'src/alglib/src/linalg.cpp',
25  'src/alglib/src/integration.cpp',
26  'src/alglib/src/alglibmisc.cpp',
27  'src/alglib/src/solvers.cpp',
28  'src/alglib/src/specialfunctions.cpp']
29 
30 YREC_tracks=glob(join_paths('src/YREC', '*.track'))
31 
32 data_path="@DATA_PATH@"
33 
34 setup(name='POET',
35  version='0.1.0',
36  author='Kaloyan Penev',
37  author_email='kpenev@gmail.com',
38  description='Calculate the orbital evolution of a planet-star system.',
39  long_description=open('README.txt').read(),
40  ext_modules=[Extension('poet',
41  ['poetModule.cpp']+
42  orbital_evolution_code+
43  alglib_code,
44  include_dirs=['src',
45  join_paths(gsl_prefix, 'include')],
46  libraries=['gsl', 'gslcblas',
47  'boost_serialization-mt'],
48  define_macros=[('YREC_TRACK_PATH',
49  join_paths(data_path, 'YREC'))],
50  depends=(glob('src/*.h')+
51  glob('src/alglib/src/*.h'))
52  )],
53  data_files=[(join_paths(data_path, 'YREC'), YREC_tracks)]
54  )
55 
56 #import poet
57 #chmod(poet.__file__,
58 # stat.S_IRUSR | stat.S_IXUSR | stat.S_IWUSR | stat.S_IRGRP |
59 # stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
Definition: setup.py:1