[Distutils] distribute_setup.py in package + setuptools 0.7.2 = package uninstallable
Andreas Kloeckner
lists at informa.tiker.net
Mon Jun 10 14:37:30 CEST 2013
Hi all,
I've shipped distribute_setup.py in a number of my packages. If a user's
install (be it virtualenv or otherwise) becomes "infected" with
setuptools 0.7.2, my packages appear to become uninstallable, with
errors like the log below.
Run the following script to reproduce:
8< ------------------------------------------------
#! /bin/sh
set -e
set -x
virtualenv --no-setuptools mypy
source mypy/bin/activate
curl -k https://bitbucket.org/pypa/setuptools/raw/0.7.2/ez_setup.py | python -
curl -k https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python -
pip install pudb==2013.1
8< ------------------------------------------------
Andreas
-------------------------------------------------------
$ pip install pudb==2013.1
Downloading/unpacking pudb==2013.1
Downloading pudb-2013.1.tar.gz (40kB): 40kB downloaded
Running setup.py egg_info for package pudb
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz
Extracting in /tmp/tmpkaEQAq
Now working in /tmp/tmpkaEQAq/distribute-0.6.35
Building a Distribute egg in /home/andreas/mypy/build/pudb
Traceback (most recent call last):
File "setup.py", line 45, in <module>
exec(init_file.read(), d)
File "<string>", line 8, in <module>
File "/tmp/tmpkaEQAq/distribute-0.6.35/setuptools/__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "/tmp/tmpkaEQAq/distribute-0.6.35/setuptools/extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "/tmp/tmpkaEQAq/distribute-0.6.35/setuptools/dist.py", line 6, in <module>
from setuptools.command.install import install
File "/tmp/tmpkaEQAq/distribute-0.6.35/setuptools/command/__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "/tmp/tmpkaEQAq/distribute-0.6.35/setuptools/command/install_scripts.py", line 3, in <module>
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "/tmp/tmpkaEQAq/distribute-0.6.35/pkg_resources.py", line 2825, in <module>
add_activation_listener(lambda dist: dist.activate())
File "/tmp/tmpkaEQAq/distribute-0.6.35/pkg_resources.py", line 710, in subscribe
callback(dist)
File "/tmp/tmpkaEQAq/distribute-0.6.35/pkg_resources.py", line 2825, in <lambda>
add_activation_listener(lambda dist: dist.activate())
File "/tmp/tmpkaEQAq/distribute-0.6.35/pkg_resources.py", line 2257, in activate
self.insert_on(path)
File "/tmp/tmpkaEQAq/distribute-0.6.35/pkg_resources.py", line 2358, in insert_on
"with distribute. Found one at %s" % str(self.location))
ValueError: A 0.7-series setuptools cannot be installed with distribute. Found one at /home/andreas/mypy/lib/python2.7/site-packages/setuptools-0.7.2-py2.7.egg
/home/andreas/mypy/build/pudb/distribute-0.6.35-py2.7.egg
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/home/andreas/mypy/build/pudb/setup.py", line 5, in <module>
use_setuptools()
File "distribute_setup.py", line 152, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "distribute_setup.py", line 132, in _do_download
_build_egg(egg, tarball, to_dir)
File "distribute_setup.py", line 123, in _build_egg
raise IOError('Could not build the egg.')
IOError: Could not build the egg.
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz
Extracting in /tmp/tmpkaEQAq
Now working in /tmp/tmpkaEQAq/distribute-0.6.35
Building a Distribute egg in /home/andreas/mypy/build/pudb
Traceback (most recent call last):
File "setup.py", line 45, in <module>
exec(init_file.read(), d)
File "<string>", line 8, in <module>
File "/tmp/tmpkaEQAq/distribute-0.6.35/setuptools/__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "/tmp/tmpkaEQAq/distribute-0.6.35/setuptools/extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "/tmp/tmpkaEQAq/distribute-0.6.35/setuptools/dist.py", line 6, in <module>
from setuptools.command.install import install
File "/tmp/tmpkaEQAq/distribute-0.6.35/setuptools/command/__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "/tmp/tmpkaEQAq/distribute-0.6.35/setuptools/command/install_scripts.py", line 3, in <module>
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "/tmp/tmpkaEQAq/distribute-0.6.35/pkg_resources.py", line 2825, in <module>
add_activation_listener(lambda dist: dist.activate())
File "/tmp/tmpkaEQAq/distribute-0.6.35/pkg_resources.py", line 710, in subscribe
callback(dist)
File "/tmp/tmpkaEQAq/distribute-0.6.35/pkg_resources.py", line 2825, in <lambda>
add_activation_listener(lambda dist: dist.activate())
File "/tmp/tmpkaEQAq/distribute-0.6.35/pkg_resources.py", line 2257, in activate
self.insert_on(path)
File "/tmp/tmpkaEQAq/distribute-0.6.35/pkg_resources.py", line 2358, in insert_on
"with distribute. Found one at %s" % str(self.location))
ValueError: A 0.7-series setuptools cannot be installed with distribute. Found one at /home/andreas/mypy/lib/python2.7/site-packages/setuptools-0.7.2-py2.7.egg
/home/andreas/mypy/build/pudb/distribute-0.6.35-py2.7.egg
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/home/andreas/mypy/build/pudb/setup.py", line 5, in <module>
use_setuptools()
File "distribute_setup.py", line 152, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "distribute_setup.py", line 132, in _do_download
_build_egg(egg, tarball, to_dir)
File "distribute_setup.py", line 123, in _build_egg
raise IOError('Could not build the egg.')
IOError: Could not build the egg.
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/andreas/mypy/build/pudb
Storing complete log in /home/andreas/.pip/pip.log
More information about the Distutils-SIG
mailing list