|Version 11 (modified by cdavid, 4 years ago)|
What is numscons ?
numscons is a python package which provides an alternative build system for numpy, that is replace most of the functionalities of numpy.distutils for the build. The goal is to make is both easier for users and developers. Users should be able to build and customize numpy more easily, and it should provide more control for developers as well.
numscons tarballs are available at:
python eggs are also available. To install numscons from eggs, you can use easy_install:
If you already installed numscons using easy_install, you can upgrade using:
easy_install -U numscons
Building numpy with numscons
To build numpy with numscons instead of numpy.distutils, you need to use numpy subversion, and just need to call setupscons.py instead of setup.py.
python setupscons.py install
Since scons supports parrallel builds, you can also try:
python setupscons.py scons --jobs=2 install
For nicer build output:
python setupscons.py scons --silent=1 install
For more information, see BuildWithNumScons.
Building scipy with numscons
Since version 0.7.0, scipy (SVN) is buildable on most common platforms, but this is experimental.
- linux + gcc compilers
- solaris Indiana + sun compilers
- mac os X + gnu compilers
- windows + mingw compilers
- windows + MS compilers
I intend to support as many OS/compiler combinations as possible, but this requires some time. For now, the following platforms are supported:
- linux with gcc + g77 or gfortran. Intel compilers and Sun compilers should also work.
- Mac OS X with gcc + gfortran
- windows 32 bits with mingw
- windows 32 bits with VS 2003 + g77
- solaris (I am testing on Indiana) with sun compilers.
I am mainly developing on linux with gcc, which means this platform is unlikely to be broken at any point, including development branches.
Controlling compiler flags
You can control the compiler as before, using --compiler and -fcompiler. You can also control compiler flags, using CFLAGS. For example, let's say you want to quickly rebuild numpy for testing, and do not care about optimizations:
CFLAGS="" python setupscons.py install
Will compile numpy without optimization flags. The big difference with numpy.distutils is that using CFLAGS will NOT override flags which are necessary to build python extensions (like -fPIC, etc...). Internally, numscons makes the difference between flags which are necessary for a given target, and the ones which are optional (optimization, warning, etc...).
Default per-compiler flags are defined in compiler.cfg and fcompiler.cfg, in numscons. I intend to support overriding those configuration files with your own (a bit like site.cfg right now), but this is not possible right now. You can edit those files directly if you want, for the time being.