From da4c91577af5bc9099403c48d68f91eb8b79ee88 Mon Sep 17 00:00:00 2001 From: hlopko Date: Tue, 8 Jan 2019 16:32:05 +0100 Subject: [PATCH] Add repository for py.mock to rules_cc RELNOTES: None. PiperOrigin-RevId: 228326658 --- WORKSPACE | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/WORKSPACE b/WORKSPACE index c34258b..2534b78 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -29,3 +29,17 @@ http_archive( strip_prefix = "abseil-py-pypi-v0.6.1", urls = ["https://github.com/abseil/abseil-py/archive/pypi-v0.6.1.zip"], ) + +http_archive( + name = "py_mock", + sha256 = "b839dd2d9c117c701430c149956918a423a9863b48b09c90e30a6013e7d2f44f", + urls = ["https://pypi.python.org/packages/source/m/mock/mock-1.0.1.tar.gz"], + strip_prefix = "mock-1.0.1", + patch_cmds = [ + "mkdir -p py/mock", + "mv mock.py py/mock/__init__.py", + """echo 'licenses(["notice"])' > BUILD""", + "touch py/BUILD", + """echo 'py_library(name = "mock", srcs = ["__init__.py"], visibility = ["//visibility:public"],)' > py/mock/BUILD""", + ], +)