Opened 11 years ago

Closed 11 years ago

#39480 closed defect (worksforme)

py-suds-jurko @0.4.1.jurko.4: build fails trying to use distribute

Reported by: mndavidoff (Monte Davidoff) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: haspatch Cc: patrik.hartlen@…, petrrr
Port: py-suds-jurko

Description

I received an error installing py27-suds-jurko because it tries to move the installed setuptools out of the way and use distribute.

$ port installed py27-setuptools
The following ports are currently installed:
  py27-setuptools @0.7.4_0 (active)
$ sudo port -vs install py27-suds-jurko
Password:
--->  Computing dependencies for py27-suds-jurko.
--->  Fetching distfiles for py27-suds-jurko
--->  Verifying checksum(s) for py27-suds-jurko
--->  Checksumming suds-jurko-0.4.1.jurko.4.tar.bz2
--->  Extracting py27-suds-jurko
--->  Extracting suds-jurko-0.4.1.jurko.4.tar.bz2
--->  Configuring py27-suds-jurko
--->  Building py27-suds-jurko
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Non-egg installation
Moving elements out of the way...
Renaming /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.7.4-py2.7.egg-info to /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.7.4-py2.7.egg-info.OLD.1371703592.92
Traceback (most recent call last):
  File "setup.py", line 161, in <module>
    **extra
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 262, in __init__
    self.fetch_build_eggs(attrs.pop('setup_requires'))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 286, in fetch_build_eggs
    parse_requirements(requires), installer=self.fetch_build_egg
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 587, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 829, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 841, in obtain
    return installer(requirement)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 336, in fetch_build_egg
    return cmd.easy_install(req)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 616, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 646, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 840, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1120, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1106, in run_setup
    run_setup(setup_script, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 67, in run_setup
    lambda: execfile(
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 117, in run
    return func()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 69, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 134, in <module>
    
  File "/tmp/easy_install-emz6mG/distribute-0.6.45/distribute_setup.py", line 386, in _before_install
  File "/tmp/easy_install-emz6mG/distribute-0.6.45/distribute_setup.py", line 443, in _fake_setuptools
  File "/tmp/easy_install-emz6mG/distribute-0.6.45/distribute_setup.py", line 241, in __no_sandbox
  File "/tmp/easy_install-emz6mG/distribute-0.6.45/distribute_setup.py", line 301, in _remove_flat_installation
  File "/tmp/easy_install-emz6mG/distribute-0.6.45/distribute_setup.py", line 241, in __no_sandbox
  File "/tmp/easy_install-emz6mG/distribute-0.6.45/distribute_setup.py", line 370, in _patch_egg_dir
  File "/tmp/easy_install-emz6mG/distribute-0.6.45/distribute_setup.py", line 281, in _rename_path
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/sandbox.py", line 130, in wrap
    return original(src,dst,*args,**kw)
OSError: [Errno 13] Permission denied
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-suds-jurko/py27-suds-jurko/work/suds-jurko-0.4.1.jurko.4" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build 
Exit code: 1
...

The attached patch works for me to fix the problem.

Attachments (3)

main.log.gz (3.4 KB) - added by mndavidoff (Monte Davidoff) 11 years ago.
Portfile.diff (256 bytes) - added by mndavidoff (Monte Davidoff) 11 years ago.
setup.py.diff (374 bytes) - added by mndavidoff (Monte Davidoff) 11 years ago.

Download all attachments as: .zip

Change History (11)

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:1 Changed 11 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

I can't reproduce this problem on my system now anymore. py*-setuptools was replaced by py*-distribute, I guess that solved the issue.

comment:2 Changed 11 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: closedreopened

comment:3 Changed 11 years ago by raimue (Rainer Müller)

Resolution: worksforme
Status: reopenedclosed

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

Resolution: worksforme
Status: closedreopened

Thank you for your attention to this. As it says in the distribute documentation at http://pythonhosted.org/distribute/, "Distribute is a deprecated fork of the Setuptools project. Since the Setuptools 0.7 release, Setuptools and Distribute have merged and Distribute is no longer being maintained." At one time, py*-setuptools was replaced by py*-distribute. More recently, this was undone, and py*-distribute was replaced by py*-setuptools. The py27-suds-jurko install does not fail for me in the same way, probably because of fixes made to setuptools. I can show py27-suds-jurko still has a problem by telling Little Snitch to deny network access to Python:

$ port installed py27-distribute py27-setuptools
The following ports are currently installed:
  py27-setuptools @1.1.6_0 (active)
$ sudo port -vs install py27-suds-jurko
--->  Computing dependencies for py27-suds-jurko.
--->  Fetching distfiles for py27-suds-jurko
--->  Verifying checksums for py27-suds-jurko
--->  Checksumming suds-jurko-0.4.1.jurko.4.tar.bz2
--->  Extracting py27-suds-jurko
--->  Extracting suds-jurko-0.4.1.jurko.4.tar.bz2
--->  Configuring py27-suds-jurko
--->  Building py27-suds-jurko
Download error on https://pypi.python.org/simple/distribute/: [Errno 64] Host is down -- Some packages may not be found!
Couldn't find index page for 'distribute' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno 64] Host is down -- Some packages may not be found!
No local packages or download links found for distribute
Traceback (most recent call last):
  File "setup.py", line 161, in <module>
    **extra
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 239, in __init__
    self.fetch_build_eggs(attrs.pop('setup_requires'))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 263, in fetch_build_eggs
    parse_requirements(requires), installer=self.fetch_build_egg
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 568, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 806, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 818, in obtain
    return installer(requirement)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 313, in fetch_build_egg
    return cmd.easy_install(req)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 603, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('distribute')
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-suds-jurko/py27-suds-jurko/work/suds-jurko-0.4.1.jurko.4" && /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-suds-jurko returned: command execution failed
Warning: targets not executed for py27-suds-jurko: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Please see the log file for port py27-suds-jurko for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-suds-jurko/py27-suds-jurko/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port py27-suds-jurko failed

The MacPorts way is for MacPorts to manage downloads and dependencies, not the scripts for individual ports. With the patch, the above install works, even though I still have Little Snitch set to deny network access to Python.

comment:5 Changed 11 years ago by petrrr

Cc: Peter.Danecek@… added

Cc Me!

comment:6 Changed 11 years ago by petrrr

I would assume this ticket is not relevant any more. The port was updated @0.5 and I do not experience any problems with the port.

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

I agree; I have not seen this problem with py-suds-jurko @0.5. It would be all right with me to close this ticket.

comment:8 Changed 11 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: reopenedclosed
Note: See TracTickets for help on using tickets.