Skip to content

Commit 4c961d9

Browse files
authored
Remove legacy pip_import (#726)
* Remove legacy pip_import * Remove legacy pip_import * Generate docs
1 parent 63805ab commit 4c961d9

File tree

10 files changed

+3
-138
lines changed

10 files changed

+3
-138
lines changed

README.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -231,23 +231,10 @@ For `pip_install` the labels are instead of the form
231231

232232
[requirements-drawbacks]: https://github.com/bazelbuild/rules_python/issues/414
233233

234-
#### 'Extras' requirement consumption
234+
#### 'Extras' dependencies
235235

236-
When using the legacy `pip_import`, you must specify the extra in the argument to the `requirement` macro. For example:
237-
238-
```python
239-
py_library(
240-
name = "mylib",
241-
srcs = ["mylib.py"],
242-
deps = [
243-
requirement("useful_dep[some_extra]"),
244-
]
245-
)
246-
```
247-
248-
If using `pip_install` or `pip_parse`, any extras specified in the requirements file will be automatically
249-
linked as a dependency of the package so that you don't need to specify the extra. In the example above,
250-
you'd just put `requirement("useful_dep")`.
236+
Any 'extras' specified in the requirements lock-file will be automatically added as transitive dependencies of the
237+
package. In the example above, you'd just put `requirement("useful_dep")`.
251238

252239
### Consuming Wheel Dists Directly
253240

docs/pip.md

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/BUILD

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ bazel_integration_test(
3838
timeout = "long",
3939
)
4040

41-
bazel_integration_test(
42-
name = "py_import_example",
43-
timeout = "long",
44-
)
45-
4641
bazel_integration_test(
4742
name = "relative_requirements_example",
4843
timeout = "long",

examples/py_import/BUILD

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

examples/py_import/WORKSPACE

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

examples/py_import/helloworld.egg

-949 Bytes
Binary file not shown.

examples/py_import/py_import_test.py

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

examples/py_import/requirements.txt

Whitespace-only changes.

examples/py_import/some_library.egg

-949 Bytes
Binary file not shown.

python/pip.bzl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,3 @@ def pip_parse(requirements_lock, name = "pip_parsed_deps", **kwargs):
210210
incremental = True,
211211
**kwargs
212212
)
213-
214-
def pip_repositories():
215-
"""
216-
Obsolete macro to pull in dependencies needed to use the pip_import rule.
217-
218-
Deprecated:
219-
the pip_repositories rule is obsolete. It is not used by pip_install.
220-
"""
221-
222-
# buildifier: disable=print
223-
print("DEPRECATED: the pip_repositories rule has been replaced with pip_install, please see rules_python 0.1 release notes")

0 commit comments

Comments
 (0)