[Distutils] setuptools vs distribute on Debian

2010-11-18 Thread Manlio Perillo
-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 SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzlS4wACgkQscQJ24LbaUQVMgCfV0oIvuUJ3xRPlNhftTJZ3HMR
0BoAn2rb8DJFaPHhRRKcDNyRNN28uUfl
=Lg51
-END PGP SIGNATURE-
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] setuptools vs distribute on Debian

2010-11-18 Thread Tres Seaver
-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  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzlT40ACgkQ+gerLs4ltQ7ZYwCfROhAZcofntZNfFvTV5CqRo9v
J1oAn3AGDhRJyrSBzCSjTT1qS40MUibJ
=IEjs
-END PGP SIGNATURE-

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] setuptools vs distribute on Debian

2010-11-18 Thread Manlio Perillo
-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
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzlUxwACgkQscQJ24LbaUR12QCfZZsSGPPglfY38fWAMYpxG2J6
q7AAnAqKHqRTvlihnEVvCDfZyCd8wrSo
=TcrT
-END PGP SIGNATURE-
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] setuptools vs distribute on Debian

2010-11-18 Thread P.J. Eby

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?

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] setuptools vs distribute on Debian

2010-11-18 Thread Manlio Perillo
-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
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzlVUIACgkQscQJ24LbaURWCQCfSpSLksFVh0CAyr11z4fBewn4
eusAn1+p5TS+fL50dZii/B+ddjf0m5Ax
=NQbr
-END PGP SIGNATURE-
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] setuptools vs distribute on Debian

2010-11-18 Thread Manlio Perillo
-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 SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzlX3MACgkQscQJ24LbaUQWZQCghGXC5BbsMnbFMYdsL3nbvaoq
SIYAoIZnOB27YKRK98uNzFoUKYksZEb5
=vxFE
-END PGP SIGNATURE-
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] setuptools vs distribute on Debian

2010-11-18 Thread Manlio Perillo
-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
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzlcawACgkQscQJ24LbaUQImgCeIn4nIbdPRLwU3OXWZ6Q9RrC+
ppYAnA9h2y9DNpsw2Zx7FmJpDHeffBC0
=RRgf
-END PGP SIGNATURE-
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig