Skip to content

Commit 37e7e68

Browse files
authored
Deleted legacy pip_import rule (bazel-contrib#582)
1 parent beed9a2 commit 37e7e68

36 files changed

+9
-1229
lines changed

.bazelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# This lets us glob() up all the files inside the examples to make them inputs to tests
44
# (Note, we cannot use `common --deleted_packages` because the bazel version command doesn't support it)
55
# To update these lines, run tools/bazel_integration_test/update_deleted_packages.sh
6-
build --deleted_packages=examples/build_file_generation,examples/legacy_pip_import/boto,examples/legacy_pip_import/extras,examples/legacy_pip_import/helloworld,examples/pip_install,examples/pip_parse,examples/py_import,examples/relative_requirements
7-
query --deleted_packages=examples/build_file_generation,examples/legacy_pip_import/boto,examples/legacy_pip_import/extras,examples/legacy_pip_import/helloworld,examples/pip_install,examples/pip_parse,examples/py_import,examples/relative_requirements
6+
build --deleted_packages=examples/build_file_generation,examples/pip_install,examples/pip_parse,examples/py_import,examples/relative_requirements
7+
query --deleted_packages=examples/build_file_generation,examples/pip_install,examples/pip_parse,examples/py_import,examples/relative_requirements
88

99
test --test_output=errors
1010

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
Please check if your PR fulfills the following requirements:
44

5-
- [ ] Does not include precompiled binaries, eg. `.par` files. See [CONTRIBUTING.md](https://github.com/bazelbuild/rules_python/blob/master/CONTRIBUTING.md) for info
65
- [ ] Tests for the changes have been added (for bug fixes / features)
76
- [ ] Docs have been added / updated (for bug fixes / features)
87

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
/bazel-genfiles
3838
/bazel-out
3939
/bazel-testlogs
40+
user.bazelrc
4041

4142
# vim swap files
4243
*.swp
@@ -45,4 +46,4 @@
4546
# Go/Gazelle files
4647
# These otherwise match patterns above
4748
!go.mod
48-
!BUILD.out
49+
!BUILD.out

CONTRIBUTING.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -52,28 +52,6 @@ bazel run //docs:update
5252
This needs to be done whenever the docstrings in the corresponding .bzl files
5353
are changed; a test failure will remind you to run this command when needed.
5454

55-
### Precompiled tools
56-
57-
The packaging rules depend on two precompiled binaries, `tools/piptool.par` and
58-
`tools/whltool.par`. We need these to be precompiled because they are invoked
59-
during `WORKSPACE` evaluation, before Bazel itself is able to build anything
60-
from source. The .par files can be regenerated by running this script in the
61-
repository root:
62-
63-
```shell
64-
# You can pass --nodocker if Docker is not available on your system.
65-
./update_tools.sh
66-
```
67-
68-
This needs to be done whenever the corresponding sources in the `packaging/`
69-
directory are updated.
70-
71-
Since these are binary files and therefore unreviewable, for security
72-
reasons<sup>1</sup> we will regenerate the .par files for you when merging your
73-
pull request.
74-
75-
<sup>1</sup> See "[Reflections on Trusting Trust](https://en.wikipedia.org/wiki/Backdoor_(computing)#Compiler_backdoors)".
76-
7755
## Core rules
7856

7957
The bulk of this repo is owned and maintained by the Bazel Python community.

README.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -154,27 +154,6 @@ load("@my_deps//:requirements.bzl", "install_deps")
154154
install_deps()
155155
```
156156

157-
### Importing `pip` dependencies with `pip_import` (legacy)
158-
159-
The deprecated `pip_import` can still be used if needed. It is the only packaging rule that supports Python 2,
160-
which has been [sunsetted since January 1st, 2020](https://www.python.org/doc/sunset-python-2/).
161-
162-
```
163-
load("@rules_python//python/legacy_pip_import:pip.bzl", "pip_import", "pip_repositories")
164-
165-
# Create a central repo that knows about the dependencies needed for requirements.txt.
166-
pip_import(
167-
name = "my_deps",
168-
requirements = "//path/to:requirements.txt",
169-
)
170-
171-
# Load the central repo's install function from its `//:requirements.bzl` file, and call it.
172-
load("@my_deps//:requirements.bzl", "pip_install")
173-
pip_install()
174-
```
175-
176-
An example can be found in [`examples/legacy_pip_import`](examples/legacy_pip_import).
177-
178157
### Consuming `pip` dependencies
179158

180159
Each extracted wheel repo contains a `py_library` target representing the

docs/pip.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,6 @@ It also generates two targets for running pip-compile:
3535
| kwargs | other bazel attributes passed to the "_test" rule | none |
3636

3737

38-
<a name="#pip_import"></a>
39-
40-
## pip_import
41-
42-
<pre>
43-
pip_import(<a href="#pip_import-kwargs">kwargs</a>)
44-
</pre>
45-
46-
Rule for installing packages listed in a requirements file.
47-
48-
**PARAMETERS**
49-
50-
51-
| Name | Description | Default Value |
52-
| :-------------: | :-------------: | :-------------: |
53-
| kwargs | <p align="center"> - </p> | none |
54-
55-
5638
<a name="#pip_install"></a>
5739

5840
## pip_install

examples/BUILD

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ package(default_visibility = ["//visibility:public"])
1717

1818
licenses(["notice"]) # Apache 2.0
1919

20-
bazel_integration_test(
21-
name = "legacy_pip_import_example",
22-
timeout = "long",
23-
)
24-
2520
bazel_integration_test(
2621
name = "pip_install_example",
2722
timeout = "long",

examples/legacy_pip_import/.bazelrc

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/legacy_pip_import/README.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/legacy_pip_import/WORKSPACE

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)