Opened 8 years ago

Closed 7 years ago

#21885 closed defect (fixed)

upgrading to latest python (2.6.3) breaks py26-setuptools for packages with C extensions

Reported by: jabronson@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: distutils263 Cc: skymoo (Adam Mercer), pjkixx@…
Port: py26-setuptools

Description

see http://tarekziade.wordpress.com/2009/10/03/python-2-6-3-and-distribute/

example:

$ port installed python26
The following ports are currently installed:
  python26 @2.6.3_0+darwin (active)
$ port installed py26-setuptools
The following ports are currently installed:
  py26-setuptools @0.6c9_0 (active)
$ sudo port -v install py26-zopeinterface
--->  Computing dependencies for py26-zopeinterface.
--->  Building py26-zopeinterface
running build
running build_py
running egg_info
writing requirements to src/zope.interface.egg-info/requires.txt
writing src/zope.interface.egg-info/PKG-INFO
writing namespace_packages to src/zope.interface.egg-info/namespace_packages.txt
writing top-level names to src/zope.interface.egg-info/top_level.txt
writing dependency_links to src/zope.interface.egg-info/dependency_links.txt
reading manifest file 'src/zope.interface.egg-info/SOURCES.txt'
writing manifest file 'src/zope.interface.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
  File "setup.py", line 86, in <module>
    **extra)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 987, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
    cmd_obj.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/build.py", line 134, in run
    self.run_command(cmd_name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
    cmd_obj.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools/command/build_ext.py", line 46, in run
    _build_ext.run(self)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/build_ext.py", line 449, in build_extensions
    self.build_extension(ext)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools/command/build_ext.py", line 175, in build_extension
    _build_ext.build_extension(self,ext)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/build_ext.py", line 460, in build_extension
    ext_path = self.get_ext_fullpath(ext.name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/build_ext.py", line 633, in get_ext_fullpath
    filename = self.get_ext_filename(modpath[-1])
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools/command/build_ext.py", line 85, in get_ext_filename
    ext = self.ext_map[fullname]
KeyError: '_zope_interface_coptimizations'
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-zopeinterface/work/zope.interface-3.3.0" && /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 setup.py --no-user-cfg build " returned error 1
Command output: Traceback (most recent call last):
  File "setup.py", line 86, in <module>
    **extra)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 987, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
    cmd_obj.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/build.py", line 134, in run
    self.run_command(cmd_name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
    cmd_obj.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools/command/build_ext.py", line 46, in run
    _build_ext.run(self)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/build_ext.py", line 449, in build_extensions
    self.build_extension(ext)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools/command/build_ext.py", line 175, in build_extension
    _build_ext.build_extension(self,ext)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/build_ext.py", line 460, in build_extension
    ext_path = self.get_ext_fullpath(ext.name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/build_ext.py", line 633, in get_ext_fullpath
    filename = self.get_ext_filename(modpath[-1])
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools/command/build_ext.py", line 85, in get_ext_filename
    ext = self.ext_map[fullname]
KeyError: '_zope_interface_coptimizations'

Warning: the following items did not execute (for py26-zopeinterface): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

I can confirm that using Distribute (Tarek's setuptools fork) to easy_install zope.interface with macports python 2.6.3 succeeds. Unless Tarek's changes make it back to py26-setuptools (which I suspect they won't), it would seem that upgrading to the latest python26 ought to somehow "swap out" py26-setuptools for py26-distribute without breaking the many packages which depend on py26-setuptools.

Change History (9)

comment:1 Changed 8 years ago by skymoo (Adam Mercer)

  • Cc ram@… added

Cc Me!

comment:4 Changed 8 years ago by blb@…

  • Keywords distutils263 added

comment:6 Changed 8 years ago by blb@…

  • Port py26-setuptools added
  • Resolution set to fixed
  • Status changed from new to closed

py26-setuptools was fixed in r58886, also see discussion on -dev thread about the future for distribute vs. setuptools.

comment:7 Changed 8 years ago by pjkixx@…

  • Cc pjkixx@… added

Cc Me!

comment:8 Changed 7 years ago by dweber@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

Ah, this seems to effect py26-django too.

$ sudo port install py26-django +bash_completion
Password:
--->  Computing dependencies for py26-django
--->  Fetching py26-distribute
--->  Verifying checksum(s) for py26-distribute
--->  Extracting py26-distribute
--->  Configuring py26-distribute
--->  Building py26-distribute
--->  Staging py26-distribute into destroot
--->  Installing py26-distribute @0.6.10_0
--->  Activating py26-distribute @0.6.10_0
Error: Target org.macports.activate returned: Image error: /opt/local/bin/easy_install-2.6 is being used by the active py26-setuptools port.  Please deactivate this port first, or use 'port -f activate py26-distribute' to force the activation.
Error: The following dependencies failed to build: py26-distribute
Error: Status 1 encountered during processing.
Before reporting a bug, first run the command again with the -d flag to get complete output.
$ port deps py26-django
Full Name: py26-django @1.1.1
Library Dependencies: python26, py26-distribute
$ port installed python26
The following ports are currently installed:
  python26 @2.6.5_0+darwin (active)
$ port installed py26-setuptools
The following ports are currently installed:
  py26-setuptools @0.6c11_1 (active)

Is there a workaround for this?

comment:9 Changed 7 years ago by jmroot (Joshua Root)

  • Resolution set to fixed
  • Status changed from reopened to closed

That's not the problem this ticket was about at all. Just uninstall setuptools.

Note: See TracTickets for help on using tickets.