
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
No, this is not a flame.
I'm on Debian Squeeze and I noticed this strange thing:
$sudo easy_install -U setuptools install_dir /usr/local/lib/python2.6/dist-packages/ Searching for distribute Reading http://pypi.python.org/simple/distribute/ Reading http://packages.python.org/distribute Best match: distribute 0.6.14 Processing distribute-0.6.14-py2.6.egg distribute 0.6.14 is already the active version in easy-install.pth Installing easy_install script to /usr/local/bin Installing easy_install-2.6 script to /usr/local/bin
Using /usr/local/lib/python2.6/dist-packages/distribute-0.6.14-py2.6.egg Processing dependencies for distribute Finished processing dependencies for distribute
Now, I read that this is a Debian policy: for some reasons they force me to use distribute instead setuptools.
However, I *do* want to use setuptools, and I'm unable to do what I want. I checked the "fake" setuptools source code but I can't see what I need to modify in order to get setuptools when I ask for setuptools.
By the way, I suspect there is a bug in Debian setuptools:
if dist.key=='distribute': # Ensure that setuptools itself never becomes unavailable! # XXX should this check for latest version? filename = os.path.join(self.install_dir,'setuptools.pth') if os.path.islink(filename): os.unlink(filename) f = open(filename, 'wt') f.write(self.pth_file.make_relative(dist.location)+'\n') f.close()
However if `easy_install setuptools` is an alias for `easy_install distribute`, that code may not executed (?)
Thanks Manlio

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 11/18/2010 10:51 AM, Manlio Perillo wrote:
No, this is not a flame.
I'm on Debian Squeeze and I noticed this strange thing:
$sudo easy_install -U setuptools install_dir /usr/local/lib/python2.6/dist-packages/ Searching for distribute Reading http://pypi.python.org/simple/distribute/ Reading http://packages.python.org/distribute Best match: distribute 0.6.14 Processing distribute-0.6.14-py2.6.egg distribute 0.6.14 is already the active version in easy-install.pth Installing easy_install script to /usr/local/bin Installing easy_install-2.6 script to /usr/local/bin
Using /usr/local/lib/python2.6/dist-packages/distribute-0.6.14-py2.6.egg Processing dependencies for distribute Finished processing dependencies for distribute
Now, I read that this is a Debian policy: for some reasons they force me to use distribute instead setuptools.
However, I *do* want to use setuptools, and I'm unable to do what I want. I checked the "fake" setuptools source code but I can't see what I need to modify in order to get setuptools when I ask for setuptools.
If you use the OS tools to install from the OS repositories, you are pretty much forced to live with any of their non-optional policy choices. Alternatives would be to go "outside the box" in one way or another:
- - Install an existing .deb file which somebody else who agrees with you has built.
- - Build and install such a .deb file yourself, e.g. via 'apt-get source setuptools' and then hack on the build files.
- - Install setuptools into the system Python manually (probably a Really Bad Idea).
- - Install and use 'virtualenv' to get an environment insulated from the system Python. 'virtualenv' still uses the "real" setuptools by default.
- - Install Python and setuptools from source.
I prefer the last option, myself, as I know better than the OS packagers do about how to configure and build Python and related stuff for my applications, just as they know better how to build it to support other system packages.
Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Il 18/11/2010 17:08, Tres Seaver ha scritto:
On 11/18/2010 10:51 AM, Manlio Perillo wrote:
No, this is not a flame.
I'm on Debian Squeeze and I noticed this strange thing:
[setuptools is an alias for sitribute]
Now, I read that this is a Debian policy: for some reasons they force me to use distribute instead setuptools.
However, I *do* want to use setuptools, and I'm unable to do what I want. I checked the "fake" setuptools source code but I can't see what I need to modify in order to get setuptools when I ask for setuptools.
If you use the OS tools to install from the OS repositories, you are pretty much forced to live with any of their non-optional policy choices. Alternatives would be to go "outside the box" in one way or another:
[...]
- Install setuptools into the system Python manually (probably a Really Bad Idea).
What I would like to do is to edit Python setuptools source files in order to remove the setuptools -> distribute alias.
Then do: $easy_install -U setuptools $aptitude purge python-setuptools $python -c "from setuptools.command import easy_install; easy_install.main(['setuptools'])"
The latter is required in order to reinstall scripts.
Note that this works on Debian Etch, but it does no more work on Debian Squeeze.
Install and use 'virtualenv' to get an environment insulated from the system Python. 'virtualenv' still uses the "real" setuptools by default.
Install Python and setuptools from source.
I prefer the last option, myself, as I know better than the OS packagers do about how to configure and build Python and related stuff for my applications, just as they know better how to build it to support other system packages.
I would like to avoid this option!
I usually build Python packages by myself (and often I use virtualenv), however I do find very useful precompiled packages for something like pygtk and pyqt, that I really *don't* want to build by myself (and, as far as I know, are not even easy installable).
Thanks Manlio

On Nov 18, 2010, at 05:23 PM, Manlio Perillo wrote:
I usually build Python packages by myself (and often I use virtualenv),
FWIW, virtualenv on Debian has a --setuptools option (and $VIRTUALENV_USE_SETUPTOOLS environment variable) to force the virtual environment to use setuptools instead of the default distribute. In fact, the standard virtualenv --distribute option is basically a no-op.
-Barry

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Il 18/11/2010 18:04, Barry Warsaw ha scritto:
On Nov 18, 2010, at 05:23 PM, Manlio Perillo wrote:
I usually build Python packages by myself (and often I use virtualenv),
FWIW, virtualenv on Debian has a --setuptools option (and $VIRTUALENV_USE_SETUPTOOLS environment variable) to force the virtual environment to use setuptools instead of the default distribute. In fact, the standard virtualenv --distribute option is basically a no-op.
Thanks, I was not aware of this.
However, since I install virtualenv using easy_install, this is not a problem.
Manlio

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Il 18/11/2010 17:09, P.J. Eby ha scritto:
At 04:51 PM 11/18/2010 +0100, Manlio Perillo wrote:
Now, I read that this is a Debian policy: for some reasons they force me to use distribute instead setuptools.
Have you tried installing setuptools from source?
Done, but still: http://paste.pocoo.org/show/293158/
This is strange, I'm probably missing something.
Thanks Manlio

At 05:33 PM 11/18/2010 +0100, Manlio Perillo wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Il 18/11/2010 17:09, P.J. Eby ha scritto:
At 04:51 PM 11/18/2010 +0100, Manlio Perillo wrote:
Now, I read that this is a Debian policy: for some reasons they force me to use distribute instead setuptools.
Have you tried installing setuptools from source?
Done, but still: http://paste.pocoo.org/show/293158/
This is strange, I'm probably missing something.
Probably there's a .pth file somewhere on sys.path that still contains distribute, so it's getting loaded first.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Il 18/11/2010 17:09, P.J. Eby ha scritto:
At 04:51 PM 11/18/2010 +0100, Manlio Perillo wrote:
Now, I read that this is a Debian policy: for some reasons they force me to use distribute instead setuptools.
Have you tried installing setuptools from source?
I have removed distribute from my system, reinstalled setuptools from source and now it works.
I'm still curious to know how setuptools was forced to be an alias for distribute...
Thanks Manlio
participants (4)
-
Barry Warsaw
-
Manlio Perillo
-
P.J. Eby
-
Tres Seaver