Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F64798077
setup.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, May 29, 13:15
Size
4 KB
Mime Type
text/x-python
Expires
Fri, May 31, 13:15 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17960353
Attached To
rPNBODY pNbody
setup.py
View Options
import
sys
,
os
,
string
,
glob
from
distutils.sysconfig
import
*
from
distutils.core
import
setup
,
Extension
from
distutils.command.build_ext
import
build_ext
from
distutils.command.install
import
install
from
distutils.command.install_data
import
install_data
import
numpy
long_description
=
"""\
This module provides lots of tools used
to deal with Nbody particles models.
"""
INCDIRS
=
[
'.'
]
SCRIPTS
=
glob
.
glob
(
'scripts/*'
)
INCDIRS
.
append
(
numpy
.
get_include
())
INCDIRS
.
append
(
numpy
.
get_numarray_include
())
INCDIRS
.
append
(
os
.
path
.
join
(
numpy
.
get_numarray_include
(),
'numpy'
))
##############################################################
# variables for ptree
##############################################################
WITH_PTREE
=
False
#MPICH_DIR = "/usr/local/lib/"
MPICH_DIR
=
"/cvos/shared/apps/ofed/1.2.5.3/mpi/gcc/mvapich2-0.9.8-15/lib"
MPICH_LIB
=
"mpich"
MPICH_INC
=
"/cvos/shared/apps/ofed/1.2.5.3/mpi/gcc/mvapich2-0.9.8-15/include"
##############################################################
##############################################################
# variables for cooling
##############################################################
WITH_COOLING_WITH_METALS
=
True
GSL_LIB
=
"gsl"
GSLCBLAS_LIB
=
"gslcblas"
M_LIB
=
"m"
INCDIRS
.
append
(
'/home/revaz/local/include/'
)
##############################################################
class
pNbody_install_data
(
install_data
):
def
finalize_options
(
self
):
if
self
.
install_dir
is
None
:
install_lib
=
self
.
get_finalized_command
(
'install_lib'
)
self
.
warn_dir
=
0
self
.
install_dir
=
os
.
path
.
normpath
(
os
.
path
.
join
(
install_lib
.
install_dir
,
"pNbody"
))
ext_modules
=
[]
ext_modules
.
append
(
Extension
(
"pNbody.nbodymodule"
,
[
"src/nbodymodule/nbodymodule.c"
],
include_dirs
=
INCDIRS
))
ext_modules
.
append
(
Extension
(
"pNbody.myNumeric"
,
[
"src/myNumeric/myNumeric.c"
],
include_dirs
=
INCDIRS
))
ext_modules
.
append
(
Extension
(
"pNbody.mapping"
,
[
"src/mapping/mapping.c"
],
include_dirs
=
INCDIRS
))
ext_modules
.
append
(
Extension
(
"pNbody.montecarlolib"
,
[
"src/montecarlolib/montecarlolib.c"
],
include_dirs
=
INCDIRS
))
ext_modules
.
append
(
Extension
(
"pNbody.coolinglib"
,
[
"src/coolinglib/coolinglib.c"
],
include_dirs
=
INCDIRS
))
ext_modules
.
append
(
Extension
(
"pNbody.cosmolib"
,
[
"src/cosmolib/cosmolib.c"
],
include_dirs
=
INCDIRS
))
ext_modules
.
append
(
Extension
(
"pNbody.iclib"
,
[
"src/iclib/iclib.c"
],
include_dirs
=
INCDIRS
))
ext_modules
.
append
(
Extension
(
"pNbody.asciilib"
,
[
"src/asciilib/asciilib.c"
],
include_dirs
=
INCDIRS
))
ext_modules
.
append
(
Extension
(
"pNbody.nbdrklib"
,
[
"src/nbdrklib/nbdrklib.c"
],
include_dirs
=
INCDIRS
))
ext_modules
.
append
(
Extension
(
"pNbody.treelib"
,
[
"src/treelib/treelib.c"
],
include_dirs
=
INCDIRS
))
ext_modules
.
append
(
Extension
(
"pNbody.peanolib"
,
[
"src/peanolib/peanolib.c"
],
include_dirs
=
INCDIRS
))
if
WITH_PTREE
:
ext_modules
.
append
(
Extension
(
"pNbody.ptreelib"
,
[
"src/ptreelib/domain.c"
,
"src/ptreelib/endrun.c"
,
"src/ptreelib/forcetree.c"
,
"src/ptreelib/ngb.c"
,
"src/ptreelib/peano.c"
,
"src/ptreelib/ptreelib.c"
,
"src/ptreelib/potential.c"
,
"src/ptreelib/gravtree.c"
,
"src/ptreelib/density.c"
,
"src/ptreelib/sph.c"
,
"src/ptreelib/io.c"
,
"src/ptreelib/system.c"
],
include_dirs
=
[
"src/ptreelib/"
,
MPICH_INC
],
library_dirs
=
[
MPICH_DIR
],
libraries
=
[
MPICH_LIB
]))
if
WITH_COOLING_WITH_METALS
:
ext_modules
.
append
(
Extension
(
"pNbody.cooling_with_metals"
,[
"src/cooling_with_metals/cooling_with_metals.c"
],
include_dirs
=
INCDIRS
,
libraries
=
[
GSL_LIB
,
GSLCBLAS_LIB
,
M_LIB
]))
packages
=
[
'pNbody'
,
'pNbody.SSP'
]
setup
(
name
=
"pNbody"
,
version
=
"4.0.0"
,
author
=
"Revaz Yves"
,
author_email
=
"yves.revaz@epfl.ch yves.revaz@obspm.fr "
,
url
=
"http://obswww.unige.ch/~revaz/pNbody/index.html"
,
description
=
"pNbody module"
,
packages
=
packages
,
cmdclass
=
{
'install_data'
:
pNbody_install_data
},
ext_modules
=
ext_modules
,
data_files
=
[(
'config'
,
glob
.
glob
(
'./config/*parameters'
)),
(
'config/rgb_tables'
,
glob
.
glob
(
'./config/rgb_tables/*'
)),
(
'config/formats'
,
glob
.
glob
(
'./config/formats/*'
)),
(
'plugins'
,
glob
.
glob
(
'./config/plugins/*'
)),
(
'opt'
,
glob
.
glob
(
'./config/opt/*'
)),
(
'fonts'
,
glob
.
glob
(
'./fonts/*'
)),
(
'tests'
,
glob
.
glob
(
'./tests/*'
)),
(
'examples'
,
glob
.
glob
(
'./examples/*.dat'
)),
(
'examples'
,
glob
.
glob
(
'./examples/*.py'
)),
(
'examples/scripts'
,
glob
.
glob
(
'./examples/scripts/*.py'
)),
(
'examples/scripts/mpi'
,
glob
.
glob
(
'./examples/scripts/mpi/*'
)),
(
'examples/films'
,
glob
.
glob
(
'./examples/films/*'
)),
(
'doc'
,
glob
.
glob
(
'./doc/man.ps'
))
],
scripts
=
SCRIPTS
)
Event Timeline
Log In to Comment