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
12 gsl_config=Popen([
'gsl-config',
'--prefix'], stdout=PIPE)
13 gsl_prefix=gsl_config.communicate()[0].strip()
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']
30 YREC_tracks=glob(join_paths(
'src/YREC',
'*.track'))
32 data_path=
"@DATA_PATH@" 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',
42 orbital_evolution_code+
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'))
53 data_files=[(join_paths(data_path,
'YREC'), YREC_tracks)]