Skip to content
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

pip_install is deprecated. Please switch to pip_parse. #129

Open
Timmmm opened this issue Jan 9, 2023 · 2 comments
Open

pip_install is deprecated. Please switch to pip_parse. #129

Timmmm opened this issue Jan 9, 2023 · 2 comments
Assignees

Comments

@Timmmm
Copy link

Timmmm commented Jan 9, 2023

When I use this it gives the following warning:

DEBUG: /home/codasip.com/timothy.hutt/.cache/bazel/_bazel_timothy.hutt/8259834f483e4f0b67749e47765325b6/external/rules_python/python/pip.bzl:46:10: pip_install is deprecated. Please switch to pip_parse. pip_install will be removed in a future release.

I did have a go at fixing this. You need to:

  1. Replace pip_install with pip_parse everywhere in init.bzl.
  2. Change the pip_requirements.txt line to:
        requirements_lock = "@rules_hdl//dependency_support:pip_requirements_lock.txt",
  1. Run this command to generate pip_requirements_lock.txt:
pip-compile --generate-hashes --output-file=pip_requirements_lock.txt pip_requirements.txt
  1. Add this to your WORKSPACE after init():
load("@rules_hdl_pip_deps//:requirements.bzl", "install_deps")
install_deps()

It's a bit annoying that the change means you need to add extra stuff to the WORKSPACE. Unfortunately I don't know enough Bazel to find a different way.

@mithro
Copy link
Member

mithro commented Jan 9, 2023

FYI - @proppy / @QuantamHD

@stridge-cruxml
Copy link
Collaborator

Also related, upgrading the version of rules_python. Currently using v0.1.0. Current release is v0.17.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants