question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Building with recent buildout always breaks the first time because of capitals in project name

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
StefanRijnhartcommented, Jul 17, 2017

@walac take care. Your health is much more important.

1reaction
StefanRijnhartcommented, Aug 18, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Four Phases of Project Management
Once you're in the build-up and implementation phases, you'll define and begin to execute the details of the project plan.
Read more >
Tall Buildings and Urban Habitat of the 21st Century - MDPI
The tall building is the most dominating symbol of the cities and a human-made marvel that defies gravity by reaching to the clouds....
Read more >
Writing technique in the construction industry
Current usage is to use capitals to start a title in a document and then revert to lower case letters unless there is...
Read more >
Fujifilm starts build-out for massive NC plant, the latest piece ...
While the $2 billion complex will eventually house 725 employees and is billed as the largest end-to-end biologics production plant in the world,...
Read more >
Companies That Succeeded With Bootstrapping - Investopedia
Entrepreneurs who bootstrap their companies start with very little money and no outside investments to build their business. Bootstrappers may rely on sweat ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found