[SciPy-dev] [Numpy-discussion] Announcing toydist, improving distribution and packaging situation

David Cournapeau cournape@gmail....
Wed Dec 30 10:04:11 CST 2009

On Wed, Dec 30, 2009 at 11:26 PM, Darren Dale <dsdale24@gmail.com> wrote:
> Hi David,
> On Mon, Dec 28, 2009 at 9:03 AM, David Cournapeau <cournape@gmail.com> wrote:
>> Executable: grin
>>    module: grin
>>    function: grin_main
>> Executable: grind
>>    module: grin
>>    function: grind_main
> Have you thought at all about operations that are currently performed
> by post-installation scripts? For example, it might be desirable for
> the ipython or MayaVi windows installers to create a folder in the
> Start menu that contains links the the executable and the
> documentation. This is probably a secondary issue at this point in
> toydist's development, but I think it is an important feature in the
> long run.

The main problem I see with post hooks is how to support them in
installers. For example, you would have a function which does the post
install, and declare it as a post install hook through decorator:

def myfunc():

The main issue is how to communicate data - that's a major issue in
every build system I know of (scons' solution is ugly: every function
takes an env argument, which is basically a giant global variable).

> Also, have you considered support for package extras (package variants
> in Ports, allowing you to specify features that pull in additional
> dependencies like traits[qt4])? Enthought makes good use of them in
> ETS, and I think they would be worth keeping.

The declarative format may declare flags as follows:

Flag: c_exts
    Description: Build (optional) C extensions
    Default: false

    if flag(c_exts):
        Extension: foo
             sources: foo.c

And this is automatically available at configure stage. It can be used
anywhere in Library, not just for Extension (you could use is within
the Requires section). I am considering adding more than Flag (flag
are boolean), if it does not make the format too complex. The use case
I have in mind is something like:

toydist configure --with-lapack-dir=/opt/mkl/lib

which I have wished to implement for numpy for ages.


More information about the SciPy-Dev mailing list