Skip to content

Commit

Permalink
[WORKSPACE] Add hermetic dependency on the Python "six" package.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 197558539
  • Loading branch information
tkoeppe committed May 22, 2018
1 parent 228de34 commit e899e13
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ software libraries, which we ship in several different ways:
software rendering via OSMesa, depending on the `--define headless=...`
build setting.
* Python 2.7 (other versions might work, too) with NumPy, PIL. (A few
tests require a NumPy version of at least 1.8.) One test requires six
to demonstrate Python 3 compatibility.
tests require a NumPy version of at least 1.8.) Python 3 is supported
experimentally.

The build rules are using a few compiler settings that are specific to GCC. If
some flags are not recognized by your compiler (typically those would be
Expand Down
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
2. The demo `:game` has a new flag `--start_index` to start at an episode index
other than 0.
3. Add a console command `dm_pickup` to pick up an item identified by its `id`.
4. More Python demos and tests now work with Python 3.

## release-2018-05-15 May 2018 release

Expand Down
11 changes: 11 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ new_http_archive(
],
)

new_http_archive(
name = "six_archive",
build_file = "six.BUILD",
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
strip_prefix = "six-1.10.0",
urls = [
"https://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
"https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
],
)

# TODO: Replace with hermetic build
new_local_repository(
name = "lua_system",
Expand Down
1 change: 1 addition & 0 deletions python/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ py_test(
data = ["//:deepmind_lab.so"],
imports = ["python"],
main = "dmlab_module_test.py",
deps = ["@six_archive//:six"],
)

py_test(
Expand Down
13 changes: 13 additions & 0 deletions six.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Description:
# Six provides simple utilities for wrapping over differences between Python 2
# and Python 3.

licenses(["notice"]) # MIT

exports_files(["LICENSE"])

py_library(
name = "six",
srcs = ["six.py"],
visibility = ["//visibility:public"],
)

0 comments on commit e899e13

Please sign in to comment.