summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2017-12-28 19:46:36 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>2017-12-28 19:46:36 +0100
commit8467586fc5546debe7b672fcebbf2b13aa6fa06c (patch)
tree034118dc13bc03ef5edd4f471ec43e04df592c39
parentRemove misleading MANIFEST template. (diff)
downloadglucometerutils-experimental-bazel-test.tar
glucometerutils-experimental-bazel-test.tar.gz
glucometerutils-experimental-bazel-test.tar.bz2
glucometerutils-experimental-bazel-test.tar.lz
glucometerutils-experimental-bazel-test.tar.xz
glucometerutils-experimental-bazel-test.tar.zst
glucometerutils-experimental-bazel-test.zip
-rw-r--r--.gitignore5
-rw-r--r--WORKSPACE20
-rw-r--r--glucometerutils/BUILD23
-rw-r--r--test/BUILD12
-rw-r--r--third_party/six.BUILD14
5 files changed, 74 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 894b10a..37e0dea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,8 @@
/MANIFEST
/dist/
__pycache__/
+/bazel-bin
+/bazel-genfiles
+/bazel-glucometerutils
+/bazel-out
+/bazel-testlogs
diff --git a/WORKSPACE b/WORKSPACE
new file mode 100644
index 0000000..5bd7c82
--- /dev/null
+++ b/WORKSPACE
@@ -0,0 +1,20 @@
+# -*- python -*-
+
+http_archive(
+ name = "abseil_py_archive",
+ strip_prefix = "abseil-py-9dd9c42657fee7f4022d625e39ca0f1f25ce265e",
+ urls = ["https://github.com/abseil/abseil-py/archive/9dd9c42657fee7f4022d625e39ca0f1f25ce265e.zip"]
+)
+
+# From abseil-py (neeeded as transitive dependency).
+# Copyright 2017 The Abseil Authors.
+new_http_archive(
+ name = "six_archive",
+ urls = [
+ "http://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",
+ ],
+ sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
+ strip_prefix = "six-1.10.0",
+ build_file = "third_party/six.BUILD",
+)
diff --git a/glucometerutils/BUILD b/glucometerutils/BUILD
new file mode 100644
index 0000000..6b3c267
--- /dev/null
+++ b/glucometerutils/BUILD
@@ -0,0 +1,23 @@
+# -*- python -*-
+
+package(
+ default_visibility = [
+ "//glucometerutils:__subpackages__",
+ "//test:__pkg__",
+ ]
+)
+
+py_library(
+ name = "exceptions",
+ srcs = ["exceptions.py"],
+ srcs_version = "PY3",
+)
+
+py_library(
+ name = "common",
+ srcs = ["common.py"],
+ srcs_version = "PY3",
+ deps = [
+ ":exceptions",
+ ]
+)
diff --git a/test/BUILD b/test/BUILD
new file mode 100644
index 0000000..e760b32
--- /dev/null
+++ b/test/BUILD
@@ -0,0 +1,12 @@
+# -*- python -*-
+
+py_test(
+ name = "test_common",
+ srcs = ["test_common.py"],
+ srcs_version = "PY3",
+ deps = [
+ "//glucometerutils:common",
+ "@abseil_py_archive//absl/testing:parameterized",
+ ],
+ default_python_version = "PY3",
+)
diff --git a/third_party/six.BUILD b/third_party/six.BUILD
new file mode 100644
index 0000000..a1b2f7b
--- /dev/null
+++ b/third_party/six.BUILD
@@ -0,0 +1,14 @@
+# 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"],
+ srcs_version = "PY2AND3",
+ visibility = ["//visibility:public"],
+)