8000 Change official workspace name to @rules_python · bazel-contrib/rules_python@dffaa17 · GitHub
[go: up one dir, main page]

Skip to content

Commit dffaa17

Browse files
committed
Change official workspace name to @rules_python
This includes regenerating the par files to use the new name. Neat trick: Since the par file regeneration depends on the previous par files, I had to bootstrap this change by temporarily editing the WORKSPACE to include: local_repository( name = "io_bazel_rules_python", path = ".", )
1 parent d852e8a commit dffaa17

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Status: This is **ALPHA** software.
44

55
[![Build status](https://badge.buildkite.com/0bcfe58b6f5741aacb09b12485969ba7a1205955a45b53e854.svg)](https://buildkite.com/bazel/python-rules-python-postsubmit)
66

7+
## Recent updates
8+
9+
* 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.
10+
711
## Rules
812

913
* [pip_import](docs/python/pip.md#pip_import)
@@ -26,14 +30,14 @@ Add the following to your `WORKSPACE` file to add the external repositories:
2630
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
2731

2832
git_repository(
29-
name = "io_bazel_rules_python",
33+
name = "rules_python",
3034
remote = "https://github.com/bazelbuild/rules_python.git",
3135
# NOT VALID! Replace this with a Git commit SHA.
3236
commit = "{HEAD}",
3337
)
3438

3539
# Only needed for PIP support:
36-
load("@io_bazel_rules_python//python:pip.bzl", "pip_repositories")
40+
load("@rules_python//python:pip.bzl", "pip_repositories")
3741

3842
pip_repositories()
3943
```
@@ -42,7 +46,7 @@ Then in your `BUILD` files load the python rules with:
4246

4347
``` python
4448
load(
45-
"@io_bazel_rules_python//python:python.bzl",
49+
"@rules_python//python:python.bzl",
4650
"py_binary", "py_library", "py_test",
4751
)
4852

@@ -60,7 +64,7 @@ are imported into the Bazel dependency graph via a two-phased process in
6064
`WORKSPACE`:
6165

6266
```python
63-
load("@io_bazel_rules_python//python:pip.bzl", "pip_import")
67+
load("@rules_python//python:pip.bzl", "pip_import")
6468

6569
# This rule translates the specified requirements.txt into
6670
# @my_deps//:requirements.bzl, which itself exposes a pip_install method.

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
workspace(name = "io_bazel_rules_python")
15+
workspace(name = "rules_python")
1616

1717
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
1818
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")

experimental/examples/wheel/wheel_test.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class WheelTest(unittest.TestCase):
2121
def test_py_library_wheel(self):
2222
filename = os.path.join(os.environ['TEST_SRCDIR'],
23-
'io_bazel_rules_python', 'experimental',
23+
'rules_python', 'experimental',
2424
'examples', 'wheel',
2525
'example_minimal_library-0.0.1-py3-none-any.whl')
2626
with zipfile.ZipFile(filename) as zf:
@@ -34,7 +34,7 @@ def test_py_library_wheel(self):
3434

3535
def test_py_package_wheel(self):
3636
filename = os.path.join(os.environ['TEST_SRCDIR'],
37-
'io_bazel_rules_python', 'experimental',
37+
'rules_python', 'experimental',
3838
'examples', 'wheel',
3939
'example_minimal_package-0.0.1-py3-none-any.whl')
4040
with zipfile.ZipFile(filename) as zf:
@@ -50,7 +50,7 @@ def test_py_package_wheel(self):
5050

5151
def test_customized_wheel(self):
5252
filename = os.path.join(os.environ['TEST_SRCDIR'],
53-
'io_bazel_rules_python', 'experimental',
53+
'rules_python', 'experimental',
5454
'examples', 'wheel',
5555
'example_customized-0.0.1-py3-none-any.whl')
5656
with zipfile.ZipFile(filename) as zf:
@@ -104,7 +104,7 @@ def test_customized_wheel(self):
104104

105105
def test_custom_package_root_wheel(self):
106106
filename = os.path.join(os.environ['TEST_SRCDIR'],
107-
'io_bazel_rules_python', 'experimental',
107+
'rules_python', 'experimental',
108108
'examples', 'wheel',
109109
'example_custom_package_root-0.0.1-py3-none-any.whl')
110110

@@ -121,7 +121,7 @@ def test_custom_package_root_wheel(self):
121121

122122
def test_custom_package_root_multi_prefix_wheel(self):
123123
filename = os.path.join(os.environ['TEST_SRCDIR'],
124-
'io_bazel_rules_python', 'experimental',
124+
'rules_python', 'experimental',
125125
'examples', 'wheel',
126126
'example_custom_package_root_multi_prefix-0.0.1-py3-none-any.whl')
127127

@@ -138,7 +138,7 @@ def test_custom_package_root_multi_prefix_wheel(self):
138138

139139
def test_custom_package_root_multi_prefix_reverse_order_wheel(self):
140140
filename = os.path.join(os.environ['TEST_SRCDIR'],
141-
'io_bazel_rules_python', 'experimental',
141+
'rules_python', 'experimental',
142142
'examples', 'wheel',
143143
'example_custom_package_root_multi_prefix_reverse_order-0.0.1-py3-none-any.whl')
144144

rules_python/piptool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def whl_library(wheel):
203203
#
204204
# Generated from {input}
205205
206-
load("@io_bazel_rules_python//python:whl.bzl", "whl_library")
206+
load("@rules_python//python:whl.bzl", "whl_library")
207207
208208
def pip_install():
209209
{whl_libraries}

tools/piptool.par

-126 Bytes
Binary file not shown.

tools/whltool.par

-90 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)
0