-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix support for
pyproject.toml
dependencies with multiple selectors (…
…#597) * Change approach to merging toml and setup deps We want to prioritize toml deps over setup deps. We don't want to remove redundant packages in toml deps because these can have corresponding, different selectors. * Change approach to merging pypi and sdist deps We want to prioritize sdist deps over pypi deps. We don't want to remove redundant packages in sdist deps because these can have corresponding, different selectors. The progressbar has become a bit more complicated because we iterate separately over sdist and pypi dependencies. * Make sure `is_arch` is `True` if any selectors While `is_arch` gets set to true if there are extras, we also want to do so if selectors have already been defined. * Don't remove "duplicates" with different selectors When removing duplicate packages, we want to consider different selectors as unique. Thus, we only remove dependencies if they have the same package name *and* the same selector. * Don't drop selectors when formatting deps Previously, selectors were getting dropped as tags and comments * Add several pypi tests These tests are designed to make sure multiple selectors for the same package are preserved correctly at every stage of the process of merging dependencies from different sources. When parsing poetry dependencies, we introduce selectors early in the process, whereas for other approaches, we retain "extras" (separated by semicolons) for much of the merging process. Packages employing each strategy are used in the added tests. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
32c230d
commit f3e910f
Showing
4 changed files
with
244 additions
and
32 deletions.
There are no files selected for viewing
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
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
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
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