Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handling of local file install edge cases; handle local file extras #5919

Merged
merged 7 commits into from
Sep 7, 2023

Conversation

matteius
Copy link
Member

@matteius matteius commented Sep 6, 2023

We definitely don't want relative one directory to be treated as package name and pip documentation does not provide much guidance on this.

The issue

Fixes #5917

The fix

If the path is not absolute, ensure it is prepended with ./ so it is treated as an installable path by pip (and not a named requirement) -- also handle the specification of extras with local file installs.

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

…t want relative one directory to be treated as package name. Pip does not provide much guidance on this.
@matteius
Copy link
Member Author

matteius commented Sep 6, 2023

Well it seems this one requires more work to untangle the edge cases.

…iely dont want relative one directory to be treated as package name. Pip does not provide much guidance on this."

This reverts commit ab5f89a.
@matteius matteius changed the title Treat local file installs as editable to pip, Treat local file installs as editable to pip, and handle their extras Sep 6, 2023
@matteius matteius requested a review from oz123 September 6, 2023 01:53
@matteius matteius marked this pull request as ready for review September 6, 2023 22:57
@matteius matteius changed the title Treat local file installs as editable to pip, and handle their extras Better handling of local file install edge cases; handle local file extras Sep 6, 2023
@oz123
Copy link
Contributor

oz123 commented Sep 7, 2023

Reading the original issue, I see a Pipfile from the user. But the dependencies sections are empty.
Can we add a test case for this PR which uses a Pipfile that walks the code path added here?
For the sake of future maintainers and us, I believe it's worth the effort.

@matteius
Copy link
Member Author

matteius commented Sep 7, 2023

@oz123 its a github actions reproduction repo, I want to extrapolate the test package into our test runner to help check editable installs better: https://github.com/stewartmiles/pipenv_editable_install_repro/blob/main/try_pipenv_versions.sh

@matteius
Copy link
Member Author

matteius commented Sep 7, 2023

I discussed with @oz123 and he is not going to block me from merging this, given both of our time constraints, I am going to make a concerted effort to improve pipenv test suite during hacktoberfest (October time-frame)

@matteius matteius merged commit 91743a6 into main Sep 7, 2023
@matteius matteius deleted the issue-5917 branch September 7, 2023 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using 2023.9.1 editable package installation fails with --skiplock enabled
2 participants