forked from cpatrick/minimal_bazel_python_bug_repro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic project to reproduce import issues.
- Loading branch information
0 parents
commit 92e3e0e
Showing
4 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"), | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |