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 ./ depends on pyutil. Pyutil uses setuptools_darcs as a build-dependency: . 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: . 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 file.

$ python ./ 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
Best match: pyutil 1.4.1
Processing pyutil-1.4.1.tar.gz
Running pyutil-1.4.1\ -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
Best match: setuptools-darcs 1.2.8
Processing setuptools_darcs-1.2.8.tar.gz
Running setuptools_darcs-1.2.8\ -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
Page at links to .py file(s) without version info; an index scan is required.
Scanning index of all packages (this may take a while)
Best match: argparse 1.0.1
Running argparse-1.0.1\ -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 "./", line 16, in <module>
  File "c:\Python26\lib\distutils\", line 152, in setup
  File "c:\Python26\lib\distutils\", line 975, in run_commands
  File "c:\Python26\lib\distutils\", line 995, in run_command
  File "build\bdist.win32\egg\setuptools\command\", line 127, in run
  File "build\bdist.win32\egg\setuptools\", line 244, in fetch_build_eggs
  File "build\bdist.win32\egg\", line 517, in resolve
    # Find the best distribution and add it to the map
  File "build\bdist.win32\egg\", line 753, in best_match
    if dist is not None:
  File "build\bdist.win32\egg\", line 765, in obtain
    ``installer(requirement)``, unless `installer` is None, in which case
  File "build\bdist.win32\egg\setuptools\", line 292, in fetch_build_egg
  File "build\bdist.win32\egg\setuptools\command\", line 471, in easy_install
  File "build\bdist.win32\egg\setuptools\command\", line 501, in install_item
  File "build\bdist.win32\egg\setuptools\command\", line 680, in install_eggs
  File "build\bdist.win32\egg\setuptools\command\", line 957, in build_and_install
  File "build\bdist.win32\egg\setuptools\command\", line 946, in run_setup
  File "build\bdist.win32\egg\setuptools\", line 29, in run_setup
  File "build\bdist.win32\egg\setuptools\", line 70, in run
  File "build\bdist.win32\egg\setuptools\", line 31, in <lambda>
  File "", line 51, in <module>
  File "c:\Python26\lib\distutils\", line 152, in setup
  File "c:\Python26\lib\distutils\", line 975, in run_commands
  File "c:\Python26\lib\distutils\", line 995, in run_command
  File "build\bdist.win32\egg\setuptools\command\", line 167, in run
  File "c:\Python26\lib\distutils\", line 333, in run_command
  File "c:\Python26\lib\distutils\", line 995, in run_command
  File "build\bdist.win32\egg\setuptools\command\", line 179, in run
  File "build\bdist.win32\egg\setuptools\command\", line 254, in find_sources
  File "build\bdist.win32\egg\setuptools\command\", line 308, in run
  File "build\bdist.win32\egg\setuptools\command\", line 335, in add_defaults
  File "build\bdist.win32\egg\setuptools\command\", line 46, in walk_revctrl
  File "build\bdist.win32\egg\", line 1917, in load
    except AttributeError:
ImportError: No module named setuptools_darcs.setuptools_darcs

Comments (3)

  1. Zooko O'Whielacronx

    To reproduce:

    tar xzf pycryptopp-0.5.17.tar.gz
    cd pycryptopp-0.5.17
    python 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 "", line 278, in <module>
      File "", 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/", line 138, in setup
        ok = dist.parse_command_line()
      File "/Library/Python/2.6/site-packages/distribute-0.6.13-py2.6.egg/setuptools/", 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/", 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/", 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/", 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/", 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/", 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 darcsver: darcs wrote to stderr: '
    darcs failed:  Not a repository: . (./_darcs/inventory: openBinaryFile: does not exist (No such file or directory))
    ' darcsver: Failure from attempt to find version tags with 'darcs changes', and pycryptopp/ 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/ -> build/lib.macosx-10.6-universal-2.6/pycryptopp
    copying pycryptopp/ -> 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
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.