forked from jazzband/pip-tools
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Relative paths support #15
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* '204-relative-path' of https://github.com/orf/pip-tools: Flake8 fixes Add a changelog entry Add tests and refactor some fixtures Add a is_subdirectory and make format_requirement use it when appropriate
* pip-tools-integration: Flake8 fixes Add a changelog entry Add tests and refactor some fixtures Add a is_subdirectory and make format_requirement use it when appropriate
Introduce a new function key_from_dist and always use key_from_ireq for InstallRequirements, key_from_req for Requirements and key_from_dist for Distributions. This also makes sync work better with editables.
It seems that "pip install" doesn't work with relative paths for editables.
suutari-ai
force-pushed
the
relative-paths
branch
2 times, most recently
from
October 8, 2017 14:09
39ca4e7
to
28a3a1e
Compare
Codecov Report
@@ Coverage Diff @@
## master #15 +/- ##
==========================================
- Coverage 89.81% 89.06% -0.76%
==========================================
Files 26 26
Lines 1453 1545 +92
Branches 303 323 +20
==========================================
+ Hits 1305 1376 +71
- Misses 100 113 +13
- Partials 48 56 +8
Continue to review full report at Codecov.
|
This makes the "via pkg" comments to be generated even if pkg is editable.
It makes sense to cache the dependencies of unpinneds too, since the dependencies won't change on a single run, but those dependencies shouldn't be stored to disk, since on the next run the unpinned distributions (editables or local directories) could have changed.
Pass the path to the directory containing the output "requirements.txt" from OutputWriter to the format_requirement function so that it can format the relative path relative to the output file.
Reraise the errors to make debugging easier.
If the previously generated output file already contained hashes for a package, use them as-is rather than recalculating them.
This should make dependency resolving work more reliably. Sometimes dependencies were calculated incorrectly when some required package was already installed.
Since the install requirement object might change, it is safer to use the URL as the key when caching the dependencies.
If a requirement is a link to an artifact (i.e. a wheel, zip, tarball, etc.), then the artifact should be hashed, not anything which is built from it.
Even unpinned non-editable VCS urls are now supported.
Sort the path requirements to top and don't use path formatting for packages found from the find-links directory.
Make the relative paths feature work on Windows too. Contains also some related refactorings and clean-ups.
This branch implements support for using relative paths as requirement entries (in setup.cfg or in requirements.in). The base feature comes from a pip-tools PR (jazzband#507) by Tom Forbes. Thanks Tom! Prequ supports also non-editable URLs and therefore the feature needed some polishing. The changes in this branch should make the feature work nicely as a whole.
suutari-ai
force-pushed
the
relative-paths
branch
from
October 8, 2017 14:25
28a3a1e
to
c033701
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement support for relative paths in the source requirements. Any
relative paths will be compiled as relative paths to the output file
too. They can be editable or non-editable.
There is also other related fixes and improvements, which are required
for this feature.
Implements #2