revision control plugin automatically installed as a build-dependency is not present when another build-dependency is being built

Zooko O'Whielacronx avatarZooko O'Whielacronx created an issue

The project being built by ./setup.py depends on pyutil. Pyutil uses setuptools_darcs as a build-dependency: http://allmydata.org/trac/pyutil/browser/pyutil/setup.py . pyutil also depends on argparse as an install dependency. It looks like by the time distribute is trying to build argparse, it has lost the copy of setuptools_darcs that it installed when it started to build pyutil.

This reminds me of the following ticket: http://bugs.python.org/setuptools/issue20 . I strongly suspect that this problem, as well as the two or so different problems described in that setuptools issue20 ticket, would be fixed by using a separate subprocess anytime distribute wants to evaluate the contents of a setup.py file.

$ python ./setup.py test
Extracting in c:\docume~1\bwilco~1\locals~1\temp\tmpg7ggnr
Now working in c:\docume~1\bwilco~1\locals~1\temp\tmpg7ggnr\distribute-0.6.3
Building a Distribute egg in C:\cygwin\home\bwilcoxohearn\src\ecometry2rabbit
warning: no files found matching 'Makefile' under directory 'docs'
running trial
Checking .pth file support in .
c:\Python26\pythonw.exe -E -c pass
Searching for pyutil>=1.4.1
Reading http://pypi.python.org/simple/pyutil/
Reading http://allmydata.org/trac/pyutil
Reading http://zooko.com/repos/pyutil
Best match: pyutil 1.4.1
Downloading http://pypi.python.org/packages/source/p/pyutil/pyutil-1.4.1.tar.gz#md5=7db6ca342eeb1152f50ab84cf2553a27
Processing pyutil-1.4.1.tar.gz
Running pyutil-1.4.1\setup.py -q bdist_egg --dist-dir c:\docume~1\bwilco~1\locals~1\temp\easy_install-ws2sco\pyutil-1.4.1\egg-dist-tmp-zbzouo
Checking .pth file support in .
c:\Python26\pythonw.exe -E -c pass
Searching for setuptools-darcs>=1.1.0
Reading http://pypi.python.org/simple/setuptools_darcs/
Reading http://allmydata.org/trac/setuptools_darcs
Best match: setuptools-darcs 1.2.8
Downloading http://pypi.python.org/packages/source/s/setuptools_darcs/setuptools_darcs-1.2.8.tar.gz#md5=e2f7617cd7c614e10ea8b7ea1abfa0b8
Processing setuptools_darcs-1.2.8.tar.gz
Running setuptools_darcs-1.2.8\setup.py -q bdist_egg --dist-dir c:\docume~1\bwilco~1\locals~1\temp\easy_install-ws2sco\pyutil-1.4.1\temp\easy_install-ykkjfn\setuptools_darcs-1.2.8\egg-dist-tmp-zpwviw

Installed c:\docume~1\bwilco~1\locals~1\temp\easy_install-ws2sco\pyutil-1.4.1\setuptools_darcs-1.2.8-py2.6.egg

Installed c:\cygwin\home\bwilcoxohearn\src\ecometry2rabbit\pyutil-1.4.1-py2.6.egg
Searching for argparse>=0.8
Reading http://pypi.python.org/simple/argparse/
Reading http://argparse.python-hosting.com/
Page at http://pypi.python.org/simple/argparse/ links to .py file(s) without version info; an index scan is required.
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Reading http://argparse.python-hosting.com/file/trunk/argparse.py?rev=6&format=raw
Best match: argparse 1.0.1
Downloading http://argparse.googlecode.com/files/argparse-1.0.1.zip
Processing argparse-1.0.1.zip
Running argparse-1.0.1\setup.py -q bdist_egg --dist-dir c:\docume~1\bwilco~1\locals~1\temp\easy_install-4bjf5b\argparse-1.0.1\egg-dist-tmp-wiyqrr
Traceback (most recent call last):
  File "./setup.py", line 16, in <module>
    zip_safe=False,
  File "c:\Python26\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "c:\Python26\lib\distutils\dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "c:\Python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "build\bdist.win32\egg\setuptools\command\test.py", line 127, in run
  File "build\bdist.win32\egg\setuptools\dist.py", line 244, in fetch_build_eggs
  File "build\bdist.win32\egg\pkg_resources.py", line 517, in resolve
    # Find the best distribution and add it to the map
  File "build\bdist.win32\egg\pkg_resources.py", line 753, in best_match
    if dist is not None:
  File "build\bdist.win32\egg\pkg_resources.py", line 765, in obtain
    ``installer(requirement)``, unless `installer` is None, in which case
  File "build\bdist.win32\egg\setuptools\dist.py", line 292, in fetch_build_egg
  File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 471, in easy_install
    
  File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 501, in install_item
    
  File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 680, in install_eggs
    
  File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 957, in build_and_install
    
  File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 946, in run_setup
    
  File "build\bdist.win32\egg\setuptools\sandbox.py", line 29, in run_setup
  File "build\bdist.win32\egg\setuptools\sandbox.py", line 70, in run
  File "build\bdist.win32\egg\setuptools\sandbox.py", line 31, in <lambda>
  File "setup.py", line 51, in <module>
    
  File "c:\Python26\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "c:\Python26\lib\distutils\dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "c:\Python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "build\bdist.win32\egg\setuptools\command\bdist_egg.py", line 167, in run
  File "c:\Python26\lib\distutils\cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "c:\Python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "build\bdist.win32\egg\setuptools\command\egg_info.py", line 179, in run
  File "build\bdist.win32\egg\setuptools\command\egg_info.py", line 254, in find_sources
  File "build\bdist.win32\egg\setuptools\command\egg_info.py", line 308, in run
  File "build\bdist.win32\egg\setuptools\command\egg_info.py", line 335, in add_defaults
  File "build\bdist.win32\egg\setuptools\command\sdist.py", line 46, in walk_revctrl
  File "build\bdist.win32\egg\pkg_resources.py", line 1917, in load
    except AttributeError:
ImportError: No module named setuptools_darcs.setuptools_darcs

Comments (3)

  1. Zooko O'Whielacronx

    To reproduce:

    wget http://pypi.python.org/packages/source/p/pycryptopp/pycryptopp-0.5.17.tar.gz
    tar xzf pycryptopp-0.5.17.tar.gz
    cd pycryptopp-0.5.17
    python setup.py build
    

    If distribute-0.6.13 is installed, the result is:

    install_dir .
    install_dir .
    warning: easy_install: byte-compiling is disabled, skipping.
    
    Installed /private/var/folders/IR/IRz-Dt-0HZaYQtX0iIuZsk+++TI/-Tmp-/easy_install-CproaQ/setuptools_darcs-1.2.11/darcsver-1.5.1-py2.6.egg
    warning: easy_install: byte-compiling is disabled, skipping.
    
    Installed /Users/zooko/playground/pycryptopp/pycryptopp-0.5.17/setuptools_darcs-1.2.11-py2.6.egg
    Traceback (most recent call last):
      File "setup.py", line 278, in <module>
        _setup(test_suite=test_suite_name)
      File "setup.py", line 273, in _setup
        zip_safe=False, # I prefer unzipped for easier access.
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 138, in setup
        ok = dist.parse_command_line()
      File "/Library/Python/2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/dist.py", line 232, in parse_command_line
        result = _Distribution.parse_command_line(self)
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 460, in parse_command_line
        args = self._parse_command_opts(parser, args)
      File "/Library/Python/2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/dist.py", line 556, in _parse_command_opts
        nargs = _Distribution._parse_command_opts(self, parser, args)
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 518, in _parse_command_opts
        cmd_class = self.get_command_class(command)
      File "/Library/Python/2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/dist.py", line 361, in get_command_class
        self.cmdclass[command] = cmdclass = ep.load()
      File "/Library/Python/2.6/site-packages/distribute-0.6.13-py2.6.egg/pkg_resources.py", line 1954, in load
        entry = __import__(self.module_name, globals(),globals(), ['__name__'])
    ImportError: No module named darcsver.setuptools_command
    

    If setuptools-0.6c11 is installed, the result is a successful build, which looks like:

    Installed /Users/zooko/playground/pycryptopp/pycryptopp-0.5.17/darcsver-1.5.1-py2.6.egg
    running darcsver
    setup.py darcsver: darcs wrote to stderr: '
    darcs failed:  Not a repository: . (./_darcs/inventory: openBinaryFile: does not exist (No such file or directory))
    '
    setup.py darcsver: Failure from attempt to find version tags with 'darcs changes', and pycryptopp/_version.py already exists, so leaving it alone.
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.6-universal-2.6
    creating build/lib.macosx-10.6-universal-2.6/pycryptopp
    copying pycryptopp/__init__.py -> build/lib.macosx-10.6-universal-2.6/pycryptopp
    copying pycryptopp/_version.py -> build/lib.macosx-10.6-universal-2.6/pycryptopp
    creating build/lib.macosx-10.6-universal-2.6/pycryptopp/cipher
    

    (successful build output truncated to save space in this comment)

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.