Skip to content

Commit

Permalink
Merge pull request #76 from rickeylev/push_up_to_215751711
Browse files Browse the repository at this point in the history
Push up to 215751711
  • Loading branch information
rickeylev committed Oct 11, 2018
2 parents 069e87f + 26f3fa4 commit 210949e
Show file tree
Hide file tree
Showing 10 changed files with 668 additions and 31 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -33,7 +33,7 @@ To run Abseil tests, you can clone the git repo and run
[bazel](https://bazel.build/):

```bash
git clone git@github.com:abseil/abseil-py.git
git clone https://github.com/abseil/abseil-py.git
cd abseil-py
bazel test absl/...
```
Expand Down
23 changes: 20 additions & 3 deletions absl/BUILD
Expand Up @@ -4,7 +4,9 @@ exports_files(["LICENSE"])

py_library(
name = "app",
srcs = ["app.py"],
srcs = [
"app.py",
],
srcs_version = "PY2AND3",
visibility = ["//visibility:public"],
deps = [
Expand All @@ -21,14 +23,29 @@ py_library(
visibility = ["//visibility:public"],
)

# NOTE: Because of how Bazel's Python support works, its possible (quite likely,
# actually) to be running Python 3 without this config setting being matched,
# so be careful about assuming or requiring it to match for a target to
# correctly work under Python 3.
config_setting(
name = "py3_mode",
values = {"force_python": "PY3"},
visibility = [":__subpackages__"],
)

py_library(
name = "_enum_module",
srcs = ["_enum_module.py"],
visibility = ["//absl:__subpackages__"],
deps = [
"@enum34_archive//:enum",
"@six_archive//:six",
],
] + select({
# In some Python 3 environments, despite the _enum_module import path
# tricks, the enum backport still ends up on sys.path before the
# stdlib, which more-or-less breaks Python
":py3_mode": [],
"//conditions:default": ["@enum34_archive//:enum"],
}),
)

py_library(
Expand Down
2 changes: 2 additions & 0 deletions absl/testing/BUILD
Expand Up @@ -11,6 +11,7 @@ py_library(
deps = [
":_pretty_print_reporter",
":xml_reporter",
"//absl:_enum_module",
"//absl:app",
"//absl/flags",
"//absl/logging",
Expand Down Expand Up @@ -51,6 +52,7 @@ py_library(
visibility = ["//visibility:public"],
deps = [
":_pretty_print_reporter",
"//absl/third_party/unittest3_backport",
"@six_archive//:six",
],
)
Expand Down

0 comments on commit 210949e

Please sign in to comment.