-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/bazelbuild/rules_python i…
…nto marian/whl_fix
- Loading branch information
Showing
27 changed files
with
249 additions
and
212 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,8 @@ | ||
# For bazel-in-bazel testing | ||
# Trick bazel into treating BUILD files under examples/* and e2e/* as being regular files | ||
# This lets us glob() up all the files inside the examples to make them inputs to tests | ||
# (Note, we cannot use `common --deleted_packages` because the bazel version command doesn't support it) | ||
# To update these lines, run this command: | ||
# sed -i.bak "/^[^#].*--deleted_packages/s#=.*#=$(find examples/*/* \( -name BUILD -or -name BUILD.bazel \) | xargs -n 1 dirname | paste -sd, -)#" .bazelrc && rm .bazelrc.bak | ||
build --deleted_packages=examples/pip/boto,examples/pip/extras,examples/pip/helloworld | ||
query --deleted_packages=examples/pip/boto,examples/pip/extras,examples/pip/helloworld |
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
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
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
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,5 @@ | ||
# pip example | ||
|
||
This shows how you can point Bazel at your requirements.txt file to get dependencies automatically installed. | ||
|
||
It also shows how a monorepo might have multiple python packages which each have a separate requirements.txt file. |
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,41 @@ | ||
workspace(name = "pip_example") | ||
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
http_archive( | ||
name = "rules_python", | ||
url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.2/rules_python-0.0.2.tar.gz", | ||
strip_prefix = "rules_python-0.0.2", | ||
sha256 = "b5668cde8bb6e3515057ef465a35ad712214962f0b3a314e551204266c7be90c", | ||
) | ||
|
||
load("@rules_python//python:pip.bzl", "pip_import", "pip_repositories") | ||
|
||
pip_repositories() | ||
|
||
pip_import( | ||
name = "helloworld_deps", | ||
requirements = "//helloworld:requirements.txt", | ||
) | ||
|
||
load("@helloworld_deps//:requirements.bzl", _helloworld_install = "pip_install") | ||
|
||
_helloworld_install() | ||
|
||
pip_import( | ||
name = "boto_deps", | ||
requirements = "//boto:requirements.txt", | ||
) | ||
|
||
load("@boto_deps//:requirements.bzl", _boto_install = "pip_install") | ||
|
||
_boto_install() | ||
|
||
pip_import( | ||
name = "extras_deps", | ||
requirements = "//extras:requirements.txt", | ||
) | ||
|
||
load("@extras_deps//:requirements.bzl", _extras_install = "pip_install") | ||
|
||
_extras_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
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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.