News for hackers. Stuff that matters.
Re:Python on Wheels by girvo on Sunday January 26, 2014 @09:00PM (#7128233)
For a language that prides itself on simplicity, this seems really painful...
Re:Python on Wheels by pak on Sunday January 26, 2014 @10:06PM (#7128506)
Yes, it is. Coming to this mess from the joy of bundler/gems, npm, or hell, even CPAN will ruin your afternoon.

It is just an unfortunate circumstance of the community not efficiently converging on well designed standards quickly enough, and so, the rocky soil has sprouted strange twisty crops. There are articles on how the setuptools/distutils frankenhack pretty much set off the whole trainwreck that you see today, e.g.: http://blog.startifact.com/posts/older/a-history-of-python-p...

Armin (the OP) has also written about this sad history previously: http://lucumr.pocoo.org/2012/6/22/hate-hate-hate-everywhere/

Re:Python on Wheels by mixmastamyk on Monday January 27, 2014 @02:33AM (#7129238)
Would be nice if there were one packaging tool all those languages were using instead of each one reinventing it.
Re:Python on Wheels by rmc on Monday January 27, 2014 @05:39AM (#7129669)
Something that integrated into your operating system distribution perhaps....
Re:Python on Wheels by the_mitsuhiko on Monday January 27, 2014 @07:31AM (#7129973)
Unfortunately most linux systems do not support multi-version installs or installs local to a user or path.
Re:Python on Wheels by muraiki on Monday January 27, 2014 @07:44AM (#7130015)
This comes very close: http://nixos.org/nixos/
Re:Python on Wheels by Debilski on Monday January 27, 2014 @06:17AM (#7129772)
An OS solution which allowed for versioned packages to be installed on a per-project base. That’d be something…
Re:Python on Wheels by mh- on Monday January 27, 2014 @06:00AM (#7129726)
aptly put. you might be onto something.
Re:Python on Wheels by mwexler on Monday January 27, 2014 @09:40AM (#7130449)
Groan. Well put, but still, groan. 8-)
Re:Python on Wheels by mitchty on Monday January 27, 2014 @09:52AM (#7130515)
Whats apt going to do for me on Redhat/CentOS?

The problem with package managers is the same as npm/gem.

Re:Python on Wheels by mh- on Monday January 27, 2014 @01:10PM (#7131962)
not much, but it was harder to work yum into a relevant sentence.

..yum.

Re:Python on Wheels by singingfish on Monday January 27, 2014 @03:20AM (#7129357)
> or even CPAN ? Cpan, particularly cpanminus is excellent.
Re:Python on Wheels by flavor8 on Monday January 27, 2014 @08:14AM (#7130120)
Also maven. It may require an XML manifest, but it's robust, easy to use, and has come to be a solid standard. Python may be a (mostly) nice language, but the infrastructure and tooling badly lags the Java world.
Re:Python on Wheels by sdegutis on Monday January 27, 2014 @12:09AM (#7128920)
Managing dependencies correctly is probably the most important long-term problem to solve in programming, but for some reason it always seems to be given a low priority by language authors and communities, until one day it's become a tangled mess that isn't logistically possible to get out of. I don't get it, and it's frustrating.[1]

[1]: Somehow, all my lines aligned perfectly in this comment box at its default size! https://www.dropbox.com/s/slq8x0rqkj7ydzn/aligned.png

Re:Python on Wheels by ithkuil on Monday January 27, 2014 @03:42AM (#7129410)
Managing dependencies correctly is probably the most important long-term problem to solve in programming ... and naming things
Re:Python on Wheels by 7952 on Monday January 27, 2014 @06:50AM (#7129872)
It is interesting to think of this in terms of basic computer science problems. A package is a cache of the developers master version which need to be invalidated. It has to be named in such a way that you can decide if it is the correct version. And sometimes it needs to be handled in a transactional way so that you have a view of the data that is consistent.

Put like that the reliable solution would be a locally replicated SQL database. Perhaps the PostgreSQL or SQLite would be a better target for development than the underlying OS?

Re:Python on Wheels by donaldstufft on Monday January 27, 2014 @07:36AM (#7129988)
A great deal of the pain that Armin experienced is mostly due to the fact that Wheels are very new and aren't very polished yet. Additionally there is a vast wealth of technical debt in the packaging tools so it's quite easy to introduce these kinds of problems because of the general architecture (Something that we're trying to fix long term!).
Re:Python on Wheels by rm445 on Monday January 27, 2014 @02:18PM (#7132458)
Is there any reason to believe wheels will ever become polished, or might they simply be replaced with the next idea that comes along?

Apologies for acting the cynic, but this is the kind of uncertainty that comes when there is constant reinvention, instead of improvement of existing tools.

Re:Python on Wheels by gbog on Sunday January 26, 2014 @10:08PM (#7128515)
You know that simplicity of use is very complex to achieve, and requires complex tools behind, right?

Actually it is even true for music instruments: A piano is very complex inside and can be played relatively easily, while a violin is much more simple in the fabric but much harder to play.

Re:Python on Wheels by 1stop on Monday January 27, 2014 @02:15AM (#7129196)
Just go and copy bundler or even npm.

This is a solved problem with a really bad case of "Not-Invented-here" in the python community.

What's funny is I'm pretty sure gems/bundler and npm/packages were heavily influenced by pythons plethora of crappy attempts (eggs, distutils...etc) at package management.

Re:Python on Wheels by acdha on Monday January 27, 2014 @08:33AM (#7130190)
> Just go and copy bundler or even npm.

Anyone who's worked with all three of those would tell you that this isn't yet a “rest on your laurels” situation.

Re:Python on Wheels by 1stop on Monday January 27, 2014 @09:07AM (#7130308)
I've worked with all three (if I count pythons ~4 as 1).

There are improvements to be made to all of them but gosh python is a complete mess in this regard.

Re:Python on Wheels by camus2 on Monday January 27, 2014 @07:38AM (#7129996)
given how npm "scales" i would not say they solved the problem,and npm lacks of namespaces. Why cant I name my package the way I want ?
Re:Python on Wheels by 1stop on Monday January 27, 2014 @09:08AM (#7130313)
As oppose to python "name it whatever you like because no one will ever find it" naming convention?

Every solution has drawbacks, but python's solution has almost every drawback.

Re:Python on Wheels by coldtea on Monday January 27, 2014 @05:45AM (#7129684)
Well, a synth trumps both in complexity, but it's very easy to play, so the analogy stops there.
Re:Python on Wheels by gbog on Monday January 27, 2014 @07:32AM (#7129974)
On the contrary, a synth is the most complex instrument and the easiest to play, that's my point.
Re:Python on Wheels by dTal on Monday January 27, 2014 @07:53AM (#7130043)
Alright then, how about a kazoo? Triangle? Or at the other end (complex AND difficult to play) a pipe organ?
Re:Python on Wheels by gbog on Monday January 27, 2014 @08:36PM (#7134733)
I didn't mean to claim that 100% of what could be named "musical instrument" is following perfectly the pattern, I was merely illustrating that "simple interfaces often require complex system".

Another illustration, in reverse: the Chinese chopsticks are among the simplest tool you can imagine, and it requires a somewhat steep learning curve, but once mastered it is really the most powerful food grabbing tool ever invented.

The Chinese brush is of the same nature: extremely simple, very hard to master, and very powerful (expressive) once mastered. Just like the violin (and VIM, and git, etc.)

On the other side of the spectrum you have the synth, IDEs, Google search, etc. Simple UIs, simple to learn, but internals are very complex.

Re:Python on Wheels by Too on Sunday January 26, 2014 @11:49PM (#7128881)
It is like a farce on the "there shall only be one way to do it" mantra. Not to mention that some of the package managers has to be installed through one of the other packet manager, creating a very long dependency chain if you want to install a package through the former.
Re:Python on Wheels by pak on Monday January 27, 2014 @12:56PM (#7131857)
The more that I use Python in the context of other languages, the more the "there should only be one [obvious] way to do it" mantra irks me.

First of all, there's the cases in which reality fails to live up to expectations, like this packaging debacle. If there was an obvious and best way to do everything, we wouldn't need to spend so much money and time engineering software. We wouldn't spend so much time arguing about distributed vs. centralized, OOP vs. declarative vs. functional, type systems, build/test systems, etc. The mantra is arrogant on its face.

Secondly, it flies in the face of innovation. It works against building a creative community of users. So often, when Python users point out the holes in the ecosystem, they are simply told "well the long and outdated PEP 5991834 already establishes the obvious way to do it" or "just shim it on top of this inadequate corner of the standard lib" or the use case itself is questioned, which patronizes the criticizer. The mantra becomes an excuse for reinforcing a hive mind philosophy.

In this case, I wonder if it has subtly undermined the development of a diverse and widely supported package index. The whole point of such a package system is to support the belief that there are actually many ways to do the same thing, and some may be better for certain styles/teams/circumstances. Having the opposite outlook as a design principle for a language will attract users less inclined to contribute to or build such a diverse packaging system. I wonder this particularly because the more "laissez-faire" languages like Perl, Ruby, and JavaScript are precisely the ones that have such great packaging systems and ecosystems.

Re:Python on Wheels by mmcnickle on Monday January 27, 2014 @04:26AM (#7129512)
Python 3.4 will have a pip installer bundled with it, which removes the easy_install pip farce.
Re:Python on Wheels by Rapidwire on Monday January 27, 2014 @02:36AM (#7129249)
No, the mantra is actually "There should be one-- and preferably only one --obvious way to do it."

And yes, one usually installs easy_install to install pip, but I don't see how that can create a "very long dependency chain". Even when both tools are installed, you can use either to install packages.

Re:Python on Wheels by donaldstufft on Monday January 27, 2014 @07:20AM (#7129943)
The recommended way to install pip has not been via easy_install for awhile. Generally we recommend using the ``get-pip.py`` script. Which with recent versions will also install setuptools for you.