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.

conversion of requirements.txt fails for editable requirements with subdirectory option

See original GitHub issue

Here is an example editable requirement that is not supported:

-e git+https://github.com/acsone/account-analytic.git@f263b5e08c45e392b60c9d879353ca71f7ac86ff#egg=odoo10_addon_account_analytic_no_lines&subdirectory=setup/account_analytic_no_lines

It is due to the &subdirectory part, which is not supported by the vendored requirements package.

Here is the incorrect regex: https://github.com/kennethreitz/pipenv/blob/dde2e52cb8bc9bfca7af6c6b1a4576faf00e84f1/pipenv/vendor/requirements/requirement.py#L23-L27

Here is the relevant stack trace part:

$ pipenv --two
Requirements file found, instead of Pipfile! Converting...
Traceback (most recent call last):
  File "/home/me/.local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
...
  File "/home/me/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/requirements/requirement.py", line 108, in parse_editable
    assert local_match is not None, 'This should match everything'
AssertionError: This should match everything

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kennethreitzcommented, Sep 5, 2017

please open an issue with the ‘requirements’ package

0reactions
sbidoulcommented, Sep 7, 2017

subdirectory support proposed upstream: https://github.com/davidfischer/requirements-parser/pull/32

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip install -r requirements.txt error, even though in correct path
And I pulled it to bash console at "pythonanywhere.com" and then moved to directory where "requirements.txt" is installed. And tried pip install ...
Read more >
pipenv Documentation - Read the Docs
Managing a requirements.txt file can be problematic, so Pipenv uses Pipfile ... You can tell Pipenv to install a path as editable —...
Read more >
pip Documentation
When globally installed packages are on the python path, and they satisfy the installation requirements, pip does nothing, and reports that ...
Read more >
Advanced Usage of Pipenv - Python Packaging Authority
Using this option to search for packages which are not in the main repository ... You can convert a Pipfile.lock into a requirements.txt...
Read more >
Good Integration Practices — pytest documentation
You can then install your package in “editable” mode by running from the same directory: pip install -e . which lets you change...
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