Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F74473613
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
Sun, Jul 28, 00:34
Size
1 KB
Mime Type
text/x-python
Expires
Tue, Jul 30, 00:34 (2 d)
Engine
blob
Format
Raw Data
Handle
19398696
Attached To
rGEAR Gear
setup.py
View Options
#!/usr/bin/env python
import
os
,
sys
from
distutils.core
import
setup
,
Extension
from
distutils.sysconfig
import
get_python_inc
from
distutils.sysconfig
import
get_python_lib
import
glob
import
numpy
'''
In order to compile with mpi,
export CC=mpicc
python setup.py build
'''
cc
=
glob
.
glob
(
"src/*.c"
)
cxx
=
glob
.
glob
(
"src/*.cxx"
)
gadget_files
=
cc
+
cxx
INCLUDES
=
[
"src/"
]
INCLUDES
.
append
(
numpy
.
get_include
())
INCLUDES
.
append
(
numpy
.
get_numarray_include
())
INCLUDES
.
append
(
os
.
path
.
join
(
numpy
.
get_numarray_include
(),
'numpy'
))
MPI_DIR
=
"/dios/shared/apps/openmpi/gcc/1.6/lib/"
MPI_LIB
=
"mpi"
INCLUDES
.
append
(
"/dios/shared/apps/openmpi/gcc/1.6/include/"
)
GRACKLE_DIR
=
"/home/epfl/revaz/local/lib"
GRACKLE_LIB
=
"grackle"
INCLUDES
.
append
(
"/home/epfl/revaz/local/include/"
)
setup
(
name
=
'PyGrackle'
,
version
=
'0.0'
,
description
=
'Python grackle code base wrapped around GEAR'
,
author
=
'Yves Revaz'
,
author_email
=
'yves.revaz@epfl.ch'
,
url
=
'http://obswww.unige.ch/~revaz/pNbody'
,
packages
=
[
'PyGrackle'
],
ext_modules
=
[
Extension
(
'PyGrackle.grackle'
,
gadget_files
,
include_dirs
=
INCLUDES
,
define_macros
=
[(
'PY_INTERFACE'
,
'1'
),(
'COOLING'
,
'1'
),(
'COOLING_GRACKLE'
,
'1'
),(
'UNEQUALSOFTENINGS'
,
'1'
),(
'LARGE_INTS'
,
'1'
),(
'CONFIG_BFLOAT_8'
,
'1'
)]
,
library_dirs
=
[
MPI_DIR
,
GRACKLE_DIR
],
libraries
=
[
'gsl'
,
'gslcblas'
,
'm'
,
MPI_LIB
,
GRACKLE_LIB
]
),
]
)
Event Timeline
Log In to Comment