-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Equivalent behaviour to pip install --find-links #1511
Conversation
Thank you so much for this PR! The PyTorch example mentioned in your write-up is exactly my use case. Right now the issue that this PR addresses is completely blocking me from accomplishing a platform-independent build with PyTorch using Poetry. I hope this is merged ASAP! |
Glad to hear it @jkyl I've rebased to clear the merge conflict which had the side benefit of removing the spurious test failures on Windows which should hopefully smooth the process. |
@sdispater any chance of a review? |
Any news on this matter? |
@cc-a can you rebase this with current master resolve conflicts please? Happy to review this. |
So as far as I'm concerned this is good to go. I'm unable to reproduce the linting error locally (different isort versions?) so am not sure whats best to do about that. |
Please be aware that even if this PR is merged, issue #2543 still blocks a number of pytorch packaging scenarios as well. |
Any update on this PR? |
Any updates? |
Hi, @cc-a are you still interested in bringing this to Poetry? There had been some changes to the codebase, so your PR would probably be a complete do-over. |
This is actually superseded by the new 'simple' repo type that allows installing from a HTML page of links. Thanks for the PR, and please test the new code in master to make sure it works for your use case! |
is there any tool to generate such HTML page of links ? |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Pull Request Check List
The What
This PR partially satisfies #1391. This PR implements a new repository class that reproduces the behaviour of the --find-links flag to
pip install
. This allows installation of packages from online locations not compliant with Pep 503.The How
The new class FindLinksRepository is implemented as a subclass of LegacyRepository as the desired behaviours are very similar with only slight changes in expected directory structure. Minor changes were made to LegacyRepository to provide functions that could be overwritten in the subclass. Combined with implementing FilteredPage as a subclass of Page this provides a fairly minimal approach to implementing this new functionality. A few minor associated changes in factory.py and pip_installer.py were required to accommodate the new repository class.
The Testing
The majority of the business logic of FindLinksRepository is derived from LegacyRepository and hence testing of this has not been repeated. Instead testing focuses on making sure that the behaviour of the major public functions of LegacyRepository is recreated with an appropriately structured test set.
A simple high level test can be performed using pytorch as an example. Create the below entry in a pyproject.toml:
Then
poetry install
.Not done yet
The behaviour of --find-links to install from local paths or file:// urls has not yet been replicated. I will follow up with another PR for this functionality if this one is successful.