8000 pip / pip_tools requirements update target upgrading by default · Issue #1334 · bazel-contrib/rules_python · GitHub
[go: up one dir, main page]

Skip to content
pip / pip_tools requirements update target upgrading by default #1334
Closed
@chrislovecnm

Description

@chrislovecnm

I'm testing on the main branch with the bzlmod example.

We have two issues:

  1. The Python script is not updating the requirements file in Linux - dependency_resolver.py
  2. bazel throws errors when you have an empty file requirement for Python 3.9. If you cp /dev/null to the requirement file:
    examples/bzlmod/requirements_lock_3_9.txt

I am testing on WSL/Linux with bazelisk.

When running the target

https://github.com/bazelbuild/rules_python/blob/93f5ea2f01ce7eb870d3ad3943eda5d354cdaac5/examples/bzlmod/BUILD.bazel#L18

bazelisk run. //:requirements_3_9.update

The above command should update the file:

https://github.com/bazelbuild/rules_python/blob/93f5ea2f01ce7eb870d3ad3943eda5d354cdaac5/examples/bzlmod/BUILD.bazel#L21

But the contents of the file are not changing.

On Linux, this line of code is run:

https://github.com/bazelbuild/rules_python/blob/93f5ea2f01ce7eb870d3ad3943eda5d354cdaac5/python/pip_install/tools/dependency_resolver/dependency_resolver.py#L179

But the following lines do not run. The cli() call is not throwing an error, but the script seems to exit.

The run command outputs the updated requirements file changes, but the file is not updated.

When you run the same file with Windows Powershell, the Windows requirements file is updated correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Can Close?Will close in 30 days if there is no new activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0