pyusb: Building with recent buildout always breaks the first time because of capitals in project name
Building PyUSB from buildout 2.9.0 or higher breaks the first time. After that, buildout finishes completely. The problem seems to be a confusion between pyusb and PyUSB as project names.
Getting distribution for 'pyusb>=1.0.0b1'.
zip_safe flag not set; analyzing archive contents...
While:
Installing odoo.
Getting distribution for 'pyusb>=1.0.0b1'.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/home/buildout/eggs/zc.buildout-2.9.0-py2.7.egg/zc/buildout/buildout.py", line 1982, in main
getattr(buildout, command)(args)
File "/home/buildout/eggs/zc.buildout-2.9.0-py2.7.egg/zc/buildout/buildout.py", line 668, in install
installed_files = self[part]._call(recipe.install)
File "/home/buildout/eggs/zc.buildout-2.9.0-py2.7.egg/zc/buildout/buildout.py", line 1419, in _call
return f()
File "/home/buildout/anybox.recipe.odoo/anybox/recipe/odoo/base.py", line 1114, in install
self.install_requirements()
File "/home/buildout/anybox.recipe.odoo/anybox/recipe/odoo/base.py", line 557, in install_requirements
eggs_recipe.install()
File "/home/buildout/eggs/zc.recipe.egg-2.0.3-py2.7.egg/zc/recipe/egg/egg.py", line 126, in install
reqs, ws = self.working_set()
File "/home/buildout/eggs/zc.recipe.egg-2.0.3-py2.7.egg/zc/recipe/egg/egg.py", line 84, in working_set
allow_hosts=self.allow_hosts)
File "/home/buildout/eggs/zc.buildout-2.9.0-py2.7.egg/zc/buildout/easy_install.py", line 914, in install
return installer.install(specs, working_set)
File "/home/buildout/eggs/zc.buildout-2.9.0-py2.7.egg/zc/buildout/easy_install.py", line 666, in install
for dist in self._get_dist(requirement, ws):
File "/home/buildout/eggs/zc.buildout-2.9.0-py2.7.egg/zc/buildout/easy_install.py", line 564, in _get_dist
dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
File "/home/buildout/eggs/zc.buildout-2.9.0-py2.7.egg/zc/buildout/easy_install.py", line 1731, in _move_to_eggs_dir_and_compile
assert newdist is not None # newloc above is missing our dist?!
Earlier versions of buildout already blurted out this warning:
Installing PyUSB 1.0.0
Caused installation of a distribution:
pyusb 1.0.0
with a different project name.
Got pyusb 1.0.0.
The relevant change in buildout is https://github.com/buildout/buildout/commit/fbb8c37b9cd2e303c37528b4f3e488bceff47f1b#diff-784f9bb654bbcee96dcbc547bbddd493R1725
I honestly don’t know enough about Python packaging to tell where this can be fixed best. Does it mean that the PyUSB distribution uses capitals in an inconsistent or non standard way? Or is the casing arbitrary and should zc.buildout be resilient to these changes?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (9 by maintainers)
@walac take care. Your health is much more important.
Thanks @hbrunn! Unrelated to this issue, but for the Odoo people here: if you actually want to use USB communication from Odoo POS, you need do need 1.0.0b1 because of API changes in this package afterwards.