Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#39415 closed defect (fixed)

py-stevedore @0.8: broken by distribute 0.7.2

Reported by: macports1@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: jmroot (Joshua Root), akitada@…, mndavidoff (Monte Davidoff), cooljeanius (Eric Gallager)
Port: py-stevedore

Description

The latest update to py27-distribute which deprecates itself and installs py27-setuptools @0.7.2_0 breaks the py27-stevedore package.

When stevedore package is loaded, the following error is shown:

stevedore.extension Could not load 'user_scripts': distribute
stevedore.extension distribute
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/stevedore/extension.py", line 75, in _load_plugins
    invoke_kwds,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/stevedore/extension.py", line 87, in _load_one_plugin
    plugin = ep.load()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 2209, in load
    if require: self.require(env, installer)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 2222, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 594, in resolve
    raise DistributionNotFound(req)
DistributionNotFound: distribute

Attachments (3)

main.log.gz (3.2 KB) - added by mndavidoff (Monte Davidoff) 11 years ago.
Portfile.diff (280 bytes) - added by mndavidoff (Monte Davidoff) 11 years ago.
setup.py.diff (640 bytes) - added by mndavidoff (Monte Davidoff) 11 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: jmr@… added
Port: py-stevedore added; py27-distribute removed
Priority: HighNormal
Summary: py27-distribute @0.7 - breaks py27-stevedorepy-stevedore @0.8: broken by distribute 0.7.2

The Priority field is for MacPorts committers; please do not set it.

I just installed py27-stevedore, and import stevedore works fine. Try reinstalling it.

% sudo port -n upgrade --force py27-stevedore

comment:2 Changed 11 years ago by macports1@…

Sorry for the priority set.

I did try to upgrade stevedore package but it didn't fix the error. I had to reinstall the py27-distribute @0.6.45_0 back to avoid the error above. I will find how to reproduce it because the error above is thrown while I execute my dotfiles. For some reason it tries to load 'distribute' dynamically.

comment:3 Changed 11 years ago by macports1@…

To reproduce the error you should:

  1. install py27-virtualenvwrapper @4.0_0
  1. create a folder $HOME/Env
  1. make sure virtualenv27 is selected:
sudo port select virtualenv virtualenv27
  1. add to your bash_profile:
export WORKON_HOME=$HOME/Env
source /opt/local/bin/virtualenvwrapper.sh-2.7
  1. Execute your terminal again.

I think virtualenvwrapper @4.0_0 depends on distribute, but I might be wrong.

comment:4 Changed 11 years ago by macports1@…

Cc: macports1@… added

Cc Me!

comment:5 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: akitada@… added; macports1@… removed

Cc-ing the virtualenv maintainer. You don’t have to Cc yourself because you’re the ticket reporter.

comment:6 Changed 11 years ago by jmroot (Joshua Root)

You would need to use -s to ensure a rebuild actually happens, i.e.:

% sudo port -sn upgrade --force py27-stevedore

So are you saying the problem only happens when virtualenvwrapper is used?

comment:7 Changed 11 years ago by macports1@…

Yes, that's right. It happens only when I call virtualenvwrapper init, the "source /opt/local/bin/virtualenvwrapper.sh-2.7" in the bash_profile.

Last edited 11 years ago by macports1@… (previous) (diff)

comment:8 Changed 11 years ago by mndavidoff (Monte Davidoff)

I'm seeing a similar problem with stevedore and distribute when I try to install py27-stevedore (main.log is attached):

$ port installed py27-distribute
None of the specified ports are installed.
$ sudo port -vs install py27-stevedore
--->  Computing dependencies for py27-stevedore.
--->  Fetching distfiles for py27-stevedore
--->  Verifying checksum(s) for py27-stevedore
--->  Checksumming stevedore-0.8.tar.gz
--->  Extracting py27-stevedore
--->  Extracting stevedore-0.8.tar.gz
--->  Configuring py27-stevedore
--->  Building py27-stevedore
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz
Extracting in /tmp/tmpM7IsDo
Now working in /tmp/tmpM7IsDo/distribute-0.6.10
Building a Distribute egg in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-stevedore/py27-stevedore/work/stevedore-0.8
Traceback (most recent call last):
  File "setup.py", line 37, in <module>
    exec(open(init_path).read(), d)
  File "<string>", line 8, in <module>
  File "/private/tmp/tmpM7IsDo/distribute-0.6.10/setuptools/__init__.py", line 2, in <module>
    from setuptools.extension import Extension, Library
  File "/private/tmp/tmpM7IsDo/distribute-0.6.10/setuptools/extension.py", line 2, in <module>
    from setuptools.dist import _get_unpatched
  File "/private/tmp/tmpM7IsDo/distribute-0.6.10/setuptools/dist.py", line 6, in <module>
    from setuptools.command.install import install
  File "/private/tmp/tmpM7IsDo/distribute-0.6.10/setuptools/command/__init__.py", line 8, in <module>
    from setuptools.command import install_scripts
  File "/private/tmp/tmpM7IsDo/distribute-0.6.10/setuptools/command/install_scripts.py", line 3, in <module>
    from pkg_resources import Distribution, PathMetadata, ensure_directory
  File "/private/tmp/tmpM7IsDo/distribute-0.6.10/pkg_resources.py", line 2675, in <module>
    add_activation_listener(lambda dist: dist.activate())
  File "/private/tmp/tmpM7IsDo/distribute-0.6.10/pkg_resources.py", line 662, in subscribe
    callback(dist)
  File "/private/tmp/tmpM7IsDo/distribute-0.6.10/pkg_resources.py", line 2675, in <lambda>
    add_activation_listener(lambda dist: dist.activate())
  File "/private/tmp/tmpM7IsDo/distribute-0.6.10/pkg_resources.py", line 2177, in activate
    self.insert_on(path)
  File "/private/tmp/tmpM7IsDo/distribute-0.6.10/pkg_resources.py", line 2278, 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 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-stevedore/py27-stevedore/work/stevedore-0.8/distribute-0.6.10-py2.7.egg
Traceback (most recent call last):
  File "setup.py", line 5, in <module>
    distribute_setup.use_setuptools()
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-stevedore/py27-stevedore/work/stevedore-0.8/distribute_setup.py", line 145, in use_setuptools
    return _do_download(version, download_base, to_dir, download_delay)
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-stevedore/py27-stevedore/work/stevedore-0.8/distribute_setup.py", line 125, in _do_download
    _build_egg(egg, tarball, to_dir)
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-stevedore/py27-stevedore/work/stevedore-0.8/distribute_setup.py", line 116, in _build_egg
    raise IOError('Could not build the egg.')
IOError: Could not build the egg.
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-stevedore/py27-stevedore/work/stevedore-0.8" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build 
Exit code: 1
Error: org.macports.build for port py27-stevedore returned: command execution failed
Warning: targets not executed for py27-stevedore: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Please see the log file for port py27-stevedore for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-stevedore/py27-stevedore/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port py27-stevedore failed

The attached patch (Portfile.diff, setup.py.diff) works for me to fix the build problem and the originally reported problem using virtualenvwrapper.

Changed 11 years ago by mndavidoff (Monte Davidoff)

Attachment: main.log.gz added

Changed 11 years ago by mndavidoff (Monte Davidoff)

Attachment: Portfile.diff added

Changed 11 years ago by mndavidoff (Monte Davidoff)

Attachment: setup.py.diff added

comment:9 Changed 11 years ago by mndavidoff (Monte Davidoff)

Cc: md14-macports@… added

Cc Me!

comment:10 Changed 11 years ago by jmroot (Joshua Root)

Build fix committed in r106938.

comment:11 Changed 11 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Rev bumped to update requires.txt in r106939.

comment:12 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.