Opened at 2010-08-31T15:39:55Z
Closed at 2011-01-02T16:07:09Z
#51 closed defect (fixed)
Installation fails with ImportError: No module named darcsver.setuptools_command
Reported by: | Nikratio | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Version: | 0.5.19 | Keywords: | |
Cc: | Launchpad Bug: |
Description
When pycryptopp is specified as an external dependency in a Python module and installed automatically by setuptools, this fails as follows:
Processing pycryptopp-0.5.17.tar.gz Running pycryptopp-0.5.17/setup.py -q bdist_egg --dist-dir /tmp/easy_install-waonxf/pycryptopp-0.5.17/egg-dist-tmp-MdU0qU Checking .pth file support in . /usr/bin/python -E -c pass Searching for setuptools-darcs>=1.0.5 Reading http://pypi.python.org/simple/setuptools_darcs/ Reading http://allmydata.org/trac/setuptools_darcs Best match: setuptools-darcs 1.2.11 Downloading http://pypi.python.org/packages/source/s/setuptools_darcs/setuptools_darcs-1.2.11.tar.gz#md5=79451a8e77b9692861a655e53df094f0 Processing setuptools_darcs-1.2.11.tar.gz Running setuptools_darcs-1.2.11/setup.py -q bdist_egg --dist-dir /tmp/easy_install-waonxf/pycryptopp-0.5.17/temp/easy_install-1I7zLX/setuptools_darcs-1.2.11/egg-dist-tmp-3DHTbn Checking .pth file support in . /usr/bin/python -E -c pass Searching for darcsver>=1.2.0 Reading http://pypi.python.org/simple/darcsver/ Reading http://allmydata.org/trac/darcsver Best match: darcsver 1.5.5 Downloading http://pypi.python.org/packages/source/d/darcsver/darcsver-1.5.5.tar.gz#md5=e31761d618c8544d626685997ac7159b Processing darcsver-1.5.5.tar.gz Running darcsver-1.5.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-waonxf/pycryptopp-0.5.17/temp/easy_install-1I7zLX/setuptools_darcs-1.2.11/temp/easy_install-38ZcnL/darcsver-1.5.5/egg-dist-tmp-DbU50F Installed /tmp/easy_install-waonxf/pycryptopp-0.5.17/temp/easy_install-1I7zLX/setuptools_darcs-1.2.11/darcsver-1.5.5-py2.6.egg Installed /tmp/easy_install-waonxf/pycryptopp-0.5.17/setuptools_darcs-1.2.11-py2.6.egg Traceback (most recent call last): File "setup.py", line 372, in <module> main() File "setup.py", line 123, in main 'upload_docs': upload_docs, } File "/usr/lib/python2.6/distutils/core.py", line 152, in setup dist.run_commands() File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands self.run_command(cmd) File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command cmd_obj.run() File "/usr/lib/python2.6/dist-packages/setuptools/command/install.py", line 73, in run self.do_egg_install() File "/usr/lib/python2.6/dist-packages/setuptools/command/install.py", line 101, in do_egg_install cmd.run() File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 254, in run self.easy_install(spec, not self.no_deps) File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 470, in easy_install return self.install_item(None, spec, tmpdir, deps, True) File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 521, in install_item self.process_distribution(spec, dist, deps) File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 577, in process_distribution self.easy_install(dist.as_requirement()) File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 489, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 519, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 698, in install_eggs return self.build_and_install(setup_script, setup_base) File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 975, in build_and_install self.run_setup(setup_script, setup_base, args) File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 964, in run_setup run_setup(setup_script, args) File "/usr/lib/python2.6/dist-packages/setuptools/sandbox.py", line 29, in run_setup lambda: execfile( File "/usr/lib/python2.6/dist-packages/setuptools/sandbox.py", line 70, in run return func() File "/usr/lib/python2.6/dist-packages/setuptools/sandbox.py", line 31, in <lambda> {'__file__':setup_script, '__name__':'__main__'} File "setup.py", line 278, in <module> setuptools_test.test.initialize_options(self) File "setup.py", line 273, in _setup 'If this option is not specified, tests requiring access ' File "/usr/lib/python2.6/distutils/core.py", line 138, in setup ok = dist.parse_command_line() File "/usr/lib/python2.6/dist-packages/setuptools/dist.py", line 232, in parse_command_line result = _Distribution.parse_command_line(self) File "/usr/lib/python2.6/distutils/dist.py", line 460, in parse_command_line args = self._parse_command_opts(parser, args) File "/usr/lib/python2.6/dist-packages/setuptools/dist.py", line 556, in _parse_command_opts nargs = _Distribution._parse_command_opts(self, parser, args) File "/usr/lib/python2.6/distutils/dist.py", line 518, in _parse_command_opts cmd_class = self.get_command_class(command) File "/usr/lib/python2.6/dist-packages/setuptools/dist.py", line 361, in get_command_class self.cmdclass[command] = cmdclass = ep.load() File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1948, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) ImportError: No module named darcsver.setuptools_command
Manually installing setuptools-darcs before calling setup.py works around this problem.
Change History (9)
comment:1 Changed at 2010-09-01T01:58:24Z by zooko
comment:2 Changed at 2010-09-01T02:59:49Z by zooko
Oh, I see that I already committed a patch which ought to work-around this: [20100601040453-92b7f-7b9a8ea12f1cd0e2e81e6a33d9fca4b4ac7cf210], which was then released in pycryptopp-0.5.18. Also I see that in the comment to that patch I attributed this bug to http://bitbucket.org/tarek/distribute/issue/55/revision-control-plugin-automatically-installed-as-a-build-dependency-is-not-present-when-another-build-dependency-is-being instead of http://bitbucket.org/tarek/distribute/issue/142/easy_install-will-install-a-package-that-is-already . http://bitbucket.org/tarek/distribute/issue/55/revision-control-plugin-automatically-installed-as-a-build-dependency-is-not-present-when-another-build-dependency-is-being is not yet marked as fixed on the distutils bug tracker, so your feedback on what version of Distribute you are using would be useful to the Distribute developers.
comment:3 Changed at 2010-09-03T12:37:21Z by Nikratio
$ python -c 'import pkg_resources;print pkg_resources.require("setuptools")'
[distribute 0.6.10 (/usr/lib/python2.6/dist-packages)]
There are some other affected systems too. I will post their setuptools versions as well when I get the chance.
comment:4 Changed at 2010-09-04T20:39:55Z by zooko
Okay could you please upgrade to pycryptopp-0.5.18 or pycryptopp-0.5.19 and see if that fixes this issue?
comment:5 Changed at 2010-09-09T18:10:10Z by Nikratio
There is something weird going on. My setup.py just specifies:
install_requires=['pycryptopp'],
but when it runs, it tries to install 0.5.17 instead of the newest version:
Searching for pycryptopp==0.5.17 Best match: pycryptopp 0.5.17
Shouldn't it search for the newest version?
If I explicitly request
install_requires=['pycryptopp >= 0.5.19'],
then everything works. But why do I have to specify the version number?
comment:6 Changed at 2010-09-09T18:48:10Z by zooko
It is just detecting that pycryptopp v0.5.17 is already installed and satisfies the requirement, so it doesn't download any newer version. This is by design.
comment:7 Changed at 2010-09-09T18:54:06Z by Nikratio
No. It continues with trying to install the (already installed) 0.5.17 and then fails with the ImportError? pasted above.
comment:8 Changed at 2010-09-18T18:08:04Z by Nikratio
I think I nailed the problem down to a setuptools bug: http://bitbucket.org/tarek/distribute/issue/181
comment:9 Changed at 2011-01-02T16:07:09Z by zooko
- Resolution set to fixed
- Status changed from new to closed
I believe this was fixed (or at least the Distribute bug was worked-around) in [20100601040453-92b7f-7b9a8ea12f1cd0e2e81e6a33d9fca4b4ac7cf210] which was released in pycryptopp-0.5.18. Please re-open if you see this bug in a newer release of pycryptopp.
Are you using the "distribute" tool http://pypi.python.org/pypi/distribute ? If so, what version? I suspect that this is a consequence of this issue: http://bitbucket.org/tarek/distribute/issue/142/easy_install-will-install-a-package-that-is-already . I will commit a work-around to pycryptopp, but please do report to me if you were using distribute and what version.
You can find out with: