Skip to content

Commit

Permalink
Update README & bazelrc (bazelbuild#1195)
Browse files Browse the repository at this point in the history
* Update README & bazelrc

* Fix bazelrc and remove unneeded ones

* Add python incompatible python toolchain & host force for build.

* Update README

* Add bazelrc back because e2e tests in examples use package mgr rules
  • Loading branch information
smukherj1 authored Oct 9, 2019
1 parent a10af78 commit 72fe2bb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 34 deletions.
7 changes: 3 additions & 4 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
# limitations under the License.

# The following flags are set to test use of new features for python toolchains
# These flags will only work with Bazel 0.25.0 or above.
build --incompatible_use_python_toolchains
# These flags will only work with Bazel 0.25.0 or above and are only needed for
# //tests/docker/security/... & the docker/package_managers rules.
build --host_force_python=PY2
build --incompatible_use_python_toolchains
test --incompatible_use_python_toolchains
test --host_force_python=PY2
run --incompatible_use_python_toolchains
run --host_force_python=PY2
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ Add the following to your `WORKSPACE` file to add the external repositories:
```python
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Download the rules_docker repository at release v0.11.1
# Download the rules_docker repository at release v0.12.0
http_archive(
name = "io_bazel_rules_docker",
sha256 = "d0b345518236e240d513fe0f59f6d3da274f035480273a7eb00af7d216ae2a06",
strip_prefix = "rules_docker-0.11.1",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.11.1/rules_docker-v0.11.1.tar.gz"],
sha256 = "413bb1ec0895a8d3249a01edf24b82fd06af3c8633c9fb833a0cb1d4b234d46d",
strip_prefix = "rules_docker-0.12.0",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.12.0/rules_docker-v0.12.0.tar.gz"],
)

# OPTIONAL: Call this to override the default docker toolchain configuration.
Expand Down Expand Up @@ -181,15 +181,6 @@ _six_ can be patched properly.

See https://github.com/bazelbuild/rules_docker/issues/1022 for more details.

* Starting with Bazel 0.27.0, you also need to add to your .bazelrc
file the following:

```
build --host_force_python=PY2
```
See https://github.com/bazelbuild/rules_docker/issues/842 for more
details.

* Ensure your project has a `BUILD` or `BUILD.bazel` file at the top level. This
can be a blank file if necessary. Otherwise you might see and error that looks
like:
Expand Down
17 changes: 0 additions & 17 deletions testing/download_pkgs_at_root/.bazelrc

This file was deleted.

1 change: 1 addition & 0 deletions testing/examples/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
build --host_force_python=PY2
test --host_force_python=PY2
run --host_force_python=PY2

0 comments on commit 72fe2bb

Please sign in to comment.