You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds `pip3_import` as a wrapper around `pip_import` that sets `python_interpreter` to `"python3"`. This is important for requesting the Python 3 version of a package on systems where the `"python"` command is Python 2 (which is most of them).
We decline to add an analogous `pip2_import` wrapper at this time, because the command `"python2"` does not exist on all platforms by default (e.g. macOS).
`piptool.py` is updated to prefix the names of the wheel repos (an implementation
detail of rules_python) with the name given to `pip_import`. This is needed to
avoid shadowing wheel repos when the same wheel name is used by separate
`pip_import` invocations -- in particular when the same wheel is used for both
PY2 and PY3. (Thanks to @joshclimacell for pointing this detail out in
his prototype 90a70d5.)
Regenerated the .par files and docs.
Also updated the README to better explain the structure of the packaging rules. This includes mentioning `pip3_import`, concerns around versioning / hermeticity, and not depending on the wheel repo names (use `requirement()` instead).
Copy file name to clipboardExpand all lines: README.md
+69-37Lines changed: 69 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,17 @@
5
5
6
6
## Recent updates
7
7
8
-
* 2019-07-26: The canonical name of this repo has been changed from `@io_bazel_rules_python` to just `@rules_python`, in accordance with [convention](https://docs.bazel.build/versions/master/skylark/deploying.html#workspace). Please update your WORKSPACE file and labels that reference this repo accordingly.
8
+
* 2019-11-15: Added support for `pip3_import` (and more generally, a
9
+
`python_interpreter` attribute to `pip_import`). The canonical naming for wheel
10
+
repositories has changed to accomodate loading wheels for both `pip_import` and
11
+
`pip3_import` in the same build. To avoid breakage, please use `requirement()`
12
+
instead of depending directly on wheel repo labels.
13
+
14
+
* 2019-07-26: The canonical name of this repo has been changed from
15
+
`@io_bazel_rules_python` to just `@rules_python`, in accordance with
0 commit comments