[Nipy-devel] Setup.py and platform specific shared objects
Thu Jan 13 15:34:07 CST 2011
It seems reasonable to assume that each user should know his own
platforms so that you could provide one binary installer for each
supported platform, as opposed to one huge tarball for all platforms
in a spm-like fashion.
Also, do you absolutely require to link dynamically with external
libraries? As far as I can tell, dynamic linking is a nightmare on
windows, not sure it is even possible using python distutils. On
windows, I have always only managed static linking, which also makes
it possible to create a self-contained installer so that people need
to download only one file to install your stuff. The price to pay is
that that file might be relatively big, but who cares nowadays?
A magical command to create a windows installer is:
python setup.py bdist --format=wininst
As a shell/compilation environment, I would recommend mingw - I don't
think there is much choice by the way. It's relatively easy to install
many ptython packages including cython on top of mingw (use binary
installers, when available, rather than easy_install). You will find a
lot of useful additional information on:
Hope it helps.
On Thu, Jan 13, 2011 at 9:22 PM, Eleftherios Garyfallidis
> Hi Gael,
> On Wed, Jan 12, 2011 at 6:04 PM, Gael Varoquaux
> <email@example.com> wrote:
>> Hey Eleftherios,
>> Quickly (I have to run to catch a bus):
> Thank you for your response and I hope you caught the bus ;-)
>> On Wed, Jan 12, 2011 at 01:51:43PM +0000, Eleftherios Garyfallidis wrote:
>> > We want to make dipy to be installed very easily to all 3 platforms
>> > Linux,Windows and Mac. As you know in dipy we use cython and although
>> > you
>> > can install cython even with easy_install these day you need to have
>> > a
>> > compiler on your system which could be a problem for some users.
>> > Therefore
>> > we would prefer to provide the compiled code for the cython modules
>> > with
>> > our installation and to be platform specific.
>> > In other words we would like to provide the .dll for the windows
>> > system,
>> > the relevant .so for the linux and mac systems.
>> My advice is: separate clearly several downloads
>> 1. The source package, that contains no binary (you can ship the
>> Cython-generated files to avoid the dependency on Cython).
> Sorry, can you elaborate more your thoughts on this? You mean to ship
> independently the compiled code? So, I suppose in that case someone will
> have to do first
> easy_install dipy
> and then download the 4 compiled shared objects for his platform and put
> them in the correct place? Perhaps we could provide a script to do that for
> So you can do something like
> easy_install dipy
> cd dipy
> python set_libs.py
> Is that what you mean?
>> 2. Binary packages, with the binary files. In this case, for windows
>> it is best to provide a '.exe' installer built with installshield.
>> That's the way we do it for the scikit.
> Do you have any tutorials or any scripts on how to do this?
>> For linux, the best way to ship binaries is problably to use RPM/deps.
> Anyone who could help with the RPMs?
>> For debs, I would ask advice to the fantastic NeuroDebian guys.
> Yes, true.
>> My 2 cents,
> Thank you,
>> Nipy-devel mailing list
> Nipy-devel mailing list
More information about the Nipy-devel