[Numpy-discussion] Distributing prebuilt numpy and other extensions

2007-02-20 Thread Zachary Pincus
Hello folks,

I've developed some command-line tools for biologists using python/ 
numpy and some custom C and Fortran extensions, and I'm trying to  
figure out how to easily distribute them...

For people using linux, I figure a source distribution is no problem  
at all. (Right?)
On the other hand, for Mac users (whose computers by default don't  
have the dev tools, and even then would need to get a fortran  
compiler elsewhere) I'd like to figure out something a bit easier.

I'd like to somehow provide an installer (double-clickable or python  
script) that does a version check and then installs an appropriate  
version of prebuilt binaries for numpy and my C and Fortran  
extensions. Is this possible within the bounds of the python or numpy  
distutils? Would setuptools be a better way to go? Preferably it  
would be a dead easy, one-step thing...

Or is this whole idea problematic, and better to stick with source  
distribution in all cases?

Thanks for any advice,

Zach Pincus


Program in Biomedical Informatics and Department of Biochemistry
Stanford University School of Medicine

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Distributing prebuilt numpy and other extensions

2007-02-20 Thread David Cournapeau
Zachary Pincus wrote:
> Hello folks,
>
> I've developed some command-line tools for biologists using python/ 
> numpy and some custom C and Fortran extensions, and I'm trying to  
> figure out how to easily distribute them...
>
> For people using linux, I figure a source distribution is no problem  
> at all. (Right?)
If they already have dependencies, and can easily install blas/lapack, 
then it is indeed relatively easy. Incidentally, I am working on a 
system to build a complete self-contained numpy/scipy from sources, 
including LAPACK/BLAS/ATLAS if necessary, for reasons similar to you. On 
linux at least, I still think source distribution is the most reliable 
(compiler version mismatch, etc... makes it really difficult to 
distribute binaries across several distributions).
> On the other hand, for Mac users (whose computers by default don't  
> have the dev tools, and even then would need to get a fortran  
> compiler elsewhere) I'd like to figure out something a bit easier.
>
I don't know much about Mac OS X, but PyMC distributes binaries for 
intel and ppc Mac in a way similar to what you are looking for:

http://trichech.us/?page_id=3

Unfortunately, the build scripts are not included in the sources, but 
maybe the author of PyMC can give you some hints ?

cheers,

David

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Distributing prebuilt numpy and other extensions

2007-02-20 Thread Robert Kern
David Cournapeau wrote:
> I don't know much about Mac OS X, but PyMC distributes binaries for 
> intel and ppc Mac in a way similar to what you are looking for:
> 
> http://trichech.us/?page_id=3

Or rather

  http://trichech.us/?page_id=4

Unfortunately, those builds are currently broken.

> Unfortunately, the build scripts are not included in the sources, but 
> maybe the author of PyMC can give you some hints ?

Primarily, you just use bdist_mpkg to generate the Installer.app packages.

  http://cheeseshop.python.org/pypi/bdist_mpkg/

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Distributing prebuilt numpy and other extensions

2007-02-21 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>,
 Zachary Pincus <[EMAIL PROTECTED]> wrote:

> Hello folks,
> 
> I've developed some command-line tools for biologists using python/ 
> numpy and some custom C and Fortran extensions, and I'm trying to  
> figure out how to easily distribute them...
> 
> For people using linux, I figure a source distribution is no problem  
> at all. (Right?)
> On the other hand, for Mac users (whose computers by default don't  
> have the dev tools, and even then would need to get a fortran  
> compiler elsewhere) I'd like to figure out something a bit easier.
> 
> I'd like to somehow provide an installer (double-clickable or python  
> script) that does a version check and then installs an appropriate  
> version of prebuilt binaries for numpy and my C and Fortran  
> extensions. Is this possible within the bounds of the python or numpy  
> distutils? Would setuptools be a better way to go? Preferably it  
> would be a dead easy, one-step thing...
> 
> Or is this whole idea problematic, and better to stick with source  
> distribution in all cases?

As Robert Kern said, using bdist_mpkg is a nice easy way to create a 
double-clickable Mac installer for python code. It builds an installer 
package using the normal setup.py file for your stuff.

Lots of packages built this way are available at:


But if you want one installer that installs everything then, you have to 
figure what to do if the user already has some of the your python 
packages installed (e.g. numpy). Overwrite the existing package? Somehow 
install it in parallel and have the user pick which version to use?

None of this is automated in bdist_mpkg. It is set up to install one 
python package at a time. So...

For your project I suspect you would be better off using easy_install

and packaging your project as a python "egg". easy_install is 
cross-platform, handles dependencies automatically and can install from 
source or precompiled binaries. That said, I've not actually used it 
except to install existing eggs, though I'd like to find some time to 
learn it.

-- Russell

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion