News for hackers. Stuff that matters.
Re:Python Packaging: Hate, hate, hate everywhere by userulluipeste on Friday June 22, 2012 @11:02AM (#4147023)
Hate, hate, hate on specific platform, not everywhere! All that trouble that he complains about is only on *nix. For Windows is quite simple. Install Phyton, then look here for other packages: http://www.lfd.uci.edu/~gohlke/pythonlibs/

Edit: I should have said ”For Windows and ReactOS”

Re:Python Packaging: Hate, hate, hate everywhere by wesm on Friday June 22, 2012 @11:12AM (#4147084)
Programmatic deployment on Windows is still a massive problem (especially for extension modules-- e.g. the entire scientific Python ecosystem).
Re:Python Packaging: Hate, hate, hate everywhere by samwillis on Friday June 22, 2012 @11:35AM (#4147192)
I have used Pip, Virtualenv and virtualenvwrapper-win on windows with very little trouble... except for anything that isn't pure Python.

In order to install PIL in a virtualenv on windows I ultimately ended up downloading the PIL windows installer, extracting the required files and placing them in the virtualenvs site packages directory.

This is what needs fixing! Pip with access to compiled windows binaries.

Install Pip on windows: http://stackoverflow.com/a/4921215

Virtualenv Win: https://github.com/davidmarble/virtualenvwrapper-win

Re:Python Packaging: Hate, hate, hate everywhere by the_mitsuhiko on Friday June 22, 2012 @01:48PM (#4147821)
> This is what needs fixing! Pip with access to compiled windows binaries.

That's the same issue really. Pip can't install (by design) binary distributions. Neither eggs nor .exes. So you are limited to easy_install on windows in many cases.

Re:Python Packaging: Hate, hate, hate everywhere by j-kidd on Friday June 22, 2012 @07:13PM (#4149377)
Self hosted PyPI (with eggbasket or even a static dir listing), combined with easy_install, is an old and unsexy solution that just works. Instead of saying we are limited to easy_install on Windows, I say we are embraced by setuptools on all platforms.
Re:Python Packaging: Hate, hate, hate everywhere by megaman821 on Friday June 22, 2012 @12:03PM (#4147338)
Inside your virtualenv you can just easy_install pil_installer.exe.

Edit: I think I should expand on the limitations of this. You can do this to any exe that was built with distutils, which you can check by changing the file extension to zip and seeing if it opens up.

Re:Python Packaging: Hate, hate, hate everywhere by maxerickson on Friday June 22, 2012 @11:53AM (#4147284)
A workaround is to edit the registry to make the virtualenv available as an install target:

http://nedbatchelder.com/blog/201007/installing_python_packa...

Re:Python Packaging: Hate, hate, hate everywhere by samwillis on Friday June 22, 2012 @12:02PM (#4147331)
Thanks for the link! That is interesting.

I followed though to the SO thread and discovered that you can install windows .exe installers using easy_install into virtualenvs. That is really usefull, its a shame that PyPi doesn't also link to the windows installers so that you wouldn't have to put the path to a windows initialler in.

--

Install windows binary packages into virtualenvs with easy_install - http://stackoverflow.com/a/5442340

Re:Python Packaging: Hate, hate, hate everywhere by userulluipeste on Friday June 22, 2012 @11:25AM (#4147147)
Actually I've tried it and got no problem. Have you tried it? Installing packages on NT-kernel OS is different than on *nix, BTW! I guess that's what it was with "programmatic".
Re:Python Packaging: Hate, hate, hate everywhere by wesm on Friday June 22, 2012 @11:28AM (#4147166)
Could you explain how Christoph Gohlke's .exe installers solve the programmatic deployment problem (clicking through an .exe installer is not "programmatic deployment")?
Re:Python Packaging: Hate, hate, hate everywhere by BijPnwkkoy on Friday June 22, 2012 @02:13PM (#4147956)
Compared to the effort to build the binaries it is trivial to repackage the content of those installers into EGG, MSI, NSI or other programmatically deployable formats. In fact the Pythonxy and Enthought Python distributions repackage some of those installers into their formats. The exe installers created by Python distutils are the least common distribution/packaging option that works on Python 2.4 to 3.3, 32 and 64 bit. The installers are valid ZIP files and it takes a few lines of command line or Python script to extract the content to any target location. It is the sheer availability of those binaries, and the feedback (incl. patches) to the package authors about Windows build and runtime issues that is the value of the project. It does not solve the Python packaging or deployment problems.
Re:Python Packaging: Hate, hate, hate everywhere by userulluipeste on Friday June 22, 2012 @11:41AM (#4147232)
Everything can be wrong when measured with a wrong reference. That, BTW, is used in marketing and PR to gain a better perception for one's "different" design. You have to do it "programmatic" on nix because that's how it's done there. Easer alternatives just aren't developed enough because those are't in accordance with the principles in place, thus aren't well received. Some like it, other come to hate it, like this guy did. You don't have to use "programatic deployment" on NT-kernel systems once all you want to do is get the job done. Stop thinking nix all the time.
Re:Python Packaging: Hate, hate, hate everywhere by calpaterson on Friday June 22, 2012 @11:55AM (#4147299)
Being able to build in one step is a common practice in software engineering everywhere, not just on unix. If you've ever heard the term "Continuous Deployment", then build in one step is being done (and hopefully more besides).
Re:Python Packaging: Hate, hate, hate everywhere by andybak on Friday June 22, 2012 @11:31AM (#4147176)
How do those nice .exe files work with virtualenvs?

You are using virtualenv, aren't you?

Re:Python Packaging: Hate, hate, hate everywhere by userulluipeste on Friday June 22, 2012 @11:44AM (#4147242)
Re:Python Packaging: Hate, hate, hate everywhere by andybak on Sunday June 24, 2012 @10:24AM (#4153366)
I was asking about whether the installers respect existing virtualenvs or whether they install globally.
Re:Python Packaging: Hate, hate, hate everywhere by Joeboy on Friday June 22, 2012 @11:37AM (#4147209)
That's great as long as it's a common package, and you want to install it globally, and you don't care what version you get.

But if that's all you want it's easier to type eg. "apt-get install python-reportlab" on *nix.

Re:Python Packaging: Hate, hate, hate everywhere by BijPnwkkoy on Friday June 22, 2012 @01:04PM (#4147624)
Among those common packages are pil-py3, numpy-mkl, scipy w/ umfpack, curses, videocapture, orange, twainmodule, simpleitk, pymol, vigra, cellprofiler, cellcognition, pythonmagick, cgkit, scikits.vectorplot, nlopt, slycot, casuarius, ilastik, iocbio, vlfd, mmlib, pysfml2, pywcs.
Re:Python Packaging: Hate, hate, hate everywhere by jlgreco on Friday June 22, 2012 @02:58PM (#4148198)
It appears as though in order to get Flask this way, I have to either also get Pylons, googlemaps, etc... or I have to unzip an exe and install it manually.

This really does not look pleasant.

Re:Python Packaging: Hate, hate, hate everywhere by BijPnwkkoy on Friday June 22, 2012 @03:09PM (#4148251)
The "Base distribution" is a distribution of packages for some specific needs. If you need individual installers for Pylons, googlemaps etc. you need to look elsewhere.
Re:Python Packaging: Hate, hate, hate everywhere by jlgreco on Friday June 22, 2012 @03:24PM (#4148320)
Yes, that is what I gathered. I mist can't see this being something I would want to use.
Re:Python Packaging: Hate, hate, hate everywhere by gte910h on Friday June 22, 2012 @01:34PM (#4147758)
I hate package dependencies on windows.