[SciPy-dev] distutils, mtrand, Monte Carlo

Ed Schofield schofield at ftw.at
Tue Apr 18 14:00:57 EDT 2006


Hi all,

I've now modified the Monte Carlo package (still in the sandbox) to use
the RNG from RandomKit that comes with numpy.  It builds and works fine
for me, but only with two directories hard-coded into the setup.py
file.  I have some questions (e.g. for Pearu) on how to use numpy
distutils to do this portably.

1. Currently the add_headers method of distutils.misc_util.Configuration
installs headers to $PREFIX/include/python2.4/numpy.  This doesn't
bother me, but do we want this?  All other header files are installed
into $PREFIX/lib/python2.4/site-packages/numpy or scipy/.

2. The add_library method creates a static library under
build/temp.linux-etc/.  Is it possible to use distutils to install this
(e.g. librandomkit.a) to a system-wide location?  (This is necessary to
prevent scipy having a build dependency on the numpy source files.)

3. Does distutils support dynamic libraries?  But randomkit is a small
library, so I suppose static linking is fine here.

I also have a question for Robert K:

A while ago you offered to work on exporting the mtrand functions so
other packages could link with them.  Could you please export the
function prototypes as a separate header file?  This would probably
require a modification the generate_mtrand_c.py script.  I'd appreciate
this; then I could modify the montecarlo package to accept a RandomState
object.

-- Ed




More information about the SciPy-Dev mailing list