Skip to content

Commit

Permalink
Basic project to reproduce import issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpatrick committed Sep 21, 2017
0 parents commit 92e3e0e
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
12 changes: 12 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("@third_party_py//:requirements.bzl", "requirement")

py_binary(
name = "repro",
srcs = [
"repro.py",
],
deps = [
requirement("google-cloud-bigquery"),
requirement("google-cloud-storage"),
],
)
19 changes: 19 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Helpful macros to support requirements/pip integration.
git_repository(
name = "io_bazel_rules_python",
commit = "40d44a7258a9016925969e2ff41c93881ddd7155",
remote = "https://github.com/bazelbuild/rules_python.git",
)

load("@io_bazel_rules_python//python:pip.bzl", "pip_repositories", "pip_import")

pip_repositories()

pip_import(
name = "third_party_py",
requirements = "//:requirements.txt",
)

load("@third_party_py//:requirements.bzl", "pip_install")

pip_install()
13 changes: 13 additions & 0 deletions repro.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import sys

print(sys.path)
import google
print(google)
from google.cloud import bigquery
from google.cloud import storage

def main():
print("You'll never see me :(")

if __name__ == '__main__':
main()
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
google-cloud-bigquery==0.27.0
google-cloud-storage==1.1.1

0 comments on commit 92e3e0e

Please sign in to comment.