[Distutils] Packaging today

Steve Spicklemire steve at spvi.com
Tue Jan 7 00:20:09 CET 2014


Thanks Chris for the detailed reply.

On Jan 6, 2014, at 4:55 PM, Chris Barker <chris.barker at noaa.gov> wrote:

> Either/or? As an instructor, I'd recommend you pick one and go with it -- if you need wx, that means Canopy for now. Alternatively, you suggest the python.org builds, and point your users to binaries they can get elsewhere (Chris Gohlke's site for Windows...)

Right. My impression is/was that python.org/CA/Canopy were all different builds of python that were *not* interoperable. So that a binary built with one could not generally be expected to work with another. If that's not true, then maybe this is a non-problem. I guess I should just "try it" and see what happens.

> 
> At the moment we're creating binary releases of vpython for windows and mac and posting them on sourceforge <https://sourceforge.net/projects/vpythonwx/>.
> 
> Are these for the python.org builds? good for you!

Yes they are for the python.org builds.

> 
> Bruce has been building the windows binary using VC (no setup.py) in a way that's compatible withpython.org python for windows. I've been building the mac version using a setup.py script I cobbled together that works on MacOSX and Linux.
> 
> Why not distutils for building Windows? I find it really helpful. 

I don't even have a 'real' windows system (only VirtualBox) and I don't have VC Studio, so Bruce has been doing all the windows work (he's got code that creates an installer that's been working for years). My attempt at a setup.py for windows didn't work for him, and I have limited ability to debug it myself. If I could get MinGW to work with my setup.py, maybe I could get things going. I just wanted to get some confirmation that it was a reasonable plan before I wasted a lot of time on what might turn out to be a dead end. Also, I've built wxPython on the mac from source multiple times so that I could turn on debug symbols. Do you think the build-wxpython.py script would work under windows with MinGW? I guess that's probably kind of a naive hope. ;-)

>  
> I've noticed that the anaconda system that C.A. installs uses MinGW on windows to build extensions.
> 
> I think Canopy does that too -- at least it did a few years ago. but I _think_ you can build extensions with either MinGW or MSVC for the same binary python -- if it's set up right ;-)

As before, maybe this is a non-problem that I should just try it. That'll be step 1. ;-)

> 
> I'd love to figure out how to build vpython under this system so that my windows users could use them together transparently.
> 
> You want to take a look at conda:
> 
> https://github.com/pydata/conda
> 
> If you can build a conda recipe then you are set to go...
> 
> That being said, it is supposed to be a goal for Anaconda to be binary compatible with the python.org binaries -- so you may well be able to build the way you are, and give the users a way to install it into Anaconda. In theory, binary wheels are the way to do this.
> 
> I'm pretty sure I could work out how to build vpython with continuum analytics on the mac (which means building boost + wxPython using the C.A. python).
> 
> ahh -- you are using wx -- I'd check with the CA folks and see where they are at -- they said they were working on a wxPython package....and I'm sure they'd like help and testing...
>  
> Is there any way, *today*, to incorporate dependencies on external libraries (e.g., boost) in setup.py?
> 
> no -- except by hand with custom code.
>  
> 
> I'm still a little unclear on your goals here.

Well I guess I am too. I was impressed with CAs ability to use 'pip' on windows to install plotly right away. It's almost like working in unix. I liked that!

It would be a dream if a student, after installing the CA distribution could type:

/anaconda/bin/pip install vpython

and it would "just work".

I understand that's impossible at the moment. But if I could create instructions and/or build a set of binary files a student could easily install that would give them:

1) vpython
2) matplotlib
3) ipython
4) scipy

I'd be ecstatic. I'll also check Chris Gohlke's site. Maybe I don't need all the bells and whistles of Canopy/CA etc.

> If you want to simple be able to tell your students to use Anaconda  then look into conda and the CA help lists -- and conda is more or less designed to solve these sorts of problems. also, the odds are good that Anaconda already has boost, and if not someone has done a conda recipe for it:
> 
> https://github.com/faircloth-lab/conda-recipes/tree/master/boost
> 
> If you want your users to be able to use any of:
> 
> Anaconda
> Python.org python
> Canopy
> 
> Then I'd look into building binary wheels, and see if you can get them to work with Anaconda and Canopy.
> 
> Note: distutils does not address the third-party non-python dependency problem -- conda tries does address it (though still not clear to me if it helps you build them...) You may also want to look at Gattai, which aims to help you build  them:
> 
> http://sourceforge.net/projects/gattai/

OK. Thanks so much! I appreciate your pointers. I'll let you know what I discover.

Ultimately I'd like to help Bruce package vpython in such a way that folks can use 'pip' to include wx and vpython in whichever python distribution they happen to choose without a lot of fuss.

thanks,
-steve

> 
> HTH,
>   -Chris
> 
> 
> 
> 
> -- 
> 
> Christopher Barker, Ph.D.
> Oceanographer
> 
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
> 
> Chris.Barker at noaa.gov



More information about the Distutils-SIG mailing list