Skip to content

Commit e899e13

Browse files
committed
[WORKSPACE] Add hermetic dependency on the Python "six" package.
PiperOrigin-RevId: 197558539
1 parent 228de34 commit e899e13

File tree

5 files changed

+28
-2
lines changed

5 files changed

+28
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ software libraries, which we ship in several different ways:
150150
software rendering via OSMesa, depending on the `--define headless=...`
151151
build setting.
152152
* Python 2.7 (other versions might work, too) with NumPy, PIL. (A few
153-
tests require a NumPy version of at least 1.8.) One test requires six
154-
to demonstrate Python 3 compatibility.
153+
tests require a NumPy version of at least 1.8.) Python 3 is supported
154+
experimentally.
155155

156156
The build rules are using a few compiler settings that are specific to GCC. If
157157
some flags are not recognized by your compiler (typically those would be

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
2. The demo `:game` has a new flag `--start_index` to start at an episode index
2525
other than 0.
2626
3. Add a console command `dm_pickup` to pick up an item identified by its `id`.
27+
4. More Python demos and tests now work with Python 3.
2728

2829
## release-2018-05-15 May 2018 release
2930

WORKSPACE

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,17 @@ new_http_archive(
7575
],
7676
)
7777

78+
new_http_archive(
79+
name = "six_archive",
80+
build_file = "six.BUILD",
81+
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
82+
strip_prefix = "six-1.10.0",
83+
urls = [
84+
"https://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
85+
"https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
86+
],
87+
)
88+
7889
# TODO: Replace with hermetic build
7990
new_local_repository(
8091
name = "lua_system",

python/tests/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ py_test(
1818
data = ["//:deepmind_lab.so"],
1919
imports = ["python"],
2020
main = "dmlab_module_test.py",
21+
deps = ["@six_archive//:six"],
2122
)
2223

2324
py_test(

six.BUILD

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Description:
2+
# Six provides simple utilities for wrapping over differences between Python 2
3+
# and Python 3.
4+
5+
licenses(["notice"]) # MIT
6+
7+
exports_files(["LICENSE"])
8+
9+
py_library(
10+
name = "six",
11+
srcs = ["six.py"],
12+
visibility = ["//visibility:public"],
13+
)

0 commit comments

Comments
 (0)