Skip to content

Local relative requirements compile fails under 0.10.0+ #766

Description

@aaliddell

🐞 bug report

Affected Rule

compile_pip_requirements

Is this a regression?

Yes. Works in 0.9.0, broken in 0.10.0+

Description

Setup is as here: #366

Under 0.10.0 and above, relative requirements fail due to not being able to resolve the file path.

Bug was introduced in aef17ad

Issue is the removal of os.chdir:

https://github.com/bazelbuild/rules_python/blob/dae610b9cad8e355eec388025807bbedc244c5de/python/pip_install/pip_compile.py#L44-L52

Became:

https://github.com/bazelbuild/rules_python/blob/aef17ad72919d184e5edb7abf61509eb78e57eda/python/pip_install/pip_compile.py#L49-L57

🔬 Minimal Reproduction

See #366

🔥 Exception or Error




WARNING:pip._internal.req.constructors:Requirement 'deps/some_name/some_name-1.2.3-py3-none-any.whl' looks like a filename, but the file does not exist

🌍 Your Environment

Operating System:

  
Ubuntu 20.04.3 LTS
  

Output of bazel version:

  
bazel 5.0.0
  

Rules_python version:

  
0.10.2
  

Anything else relevant?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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