Skip to content

pip.parse attempts to download dependencies for unsupported platforms #2634

Closed as not planned
@keith

Description

@keith

🐞 bug report

Affected Rule

pip.parse

Is this a regression?

Unclear

Description

If you generate platform specific requirements.txt files, and then provide them to pip.parse with requirements_by_platform, and also set experimental_target_platforms, pip.parse still attempts to download dependencies that are platform specific.

🔬 Minimal Reproduction

On this branch #2633 run bazel query 'deps(...)' on a Linux machine

🔥 Exception or Error


ERROR: Evaluation of query "deps(...)" failed: preloading transitive closure failed: no such package '@@rules_python++pip+pip//pywin32': BUILD file not found in directory 'pywin32' of external repository @@rules_python++pip+pip. Add a BUILD file to a directory to mark it as a package.
Loading: 7 packages loaded
    Fetching repository @@rules_python++pip+pip_312_certifi_sdist_3d5da692; Running IsStandaloneInterpreter
    Fetching repository @@rules_python++pip+pip_312_charset_normalizer_cp312_cp312_win_amd64_6ff8a4a6; Running IsStandaloneInterpreter
    Fetching repository @@rules_python++pip+pip_312_blinker_sdist_b4ce2265; Running IsStandaloneInterpreter
    Fetching repository @@rules_python++pip+pip_312_brotli_sdist_81de08ac; starting
    Fetching repository @@rules_python++pip+pip_312_configargparse_sdist_e7067471; starting
    Fetching repository @@rules_python++pip+pip_312_click_py3_none_any_63c132bb; starting
    Fetching repository @@rules_python++pip+pip_312_brotli_cp312_cp312_macosx_10_13_universal2_32d95b80; starting
    Fetching repository @@rules_python++pip+pip_312_click_sdist_ed53c9d8; starting ... (47 fetches)

In this case it attempts to find a windows specific dependency, even though windows isn't supported, and the current host isn't windows.

🌍 Your Environment

Operating System:

linux x86_64

Output of bazel version:

8.1.0

Rules_python version:

branch above

Anything else relevant?

I think there was another issue about this in the past but I can't find it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions