| commit | bf09dc6f6bd6643ca8e5c817fdf4e5e86c54f82b | [log] [tgz] |
|---|---|---|
| author | Jonathon Belotti <jonathon@canva.com> | Tue Nov 05 11:19:51 2019 +1100 |
| committer | GitHub <noreply@github.com> | Tue Nov 05 11:19:51 2019 +1100 |
| tree | 54d30d777f1f9dd4aa02a55cba6de47e956d3d4d | |
| parent | 37dad8910495ad71bae391db7a843a0f7a3ea902 [diff] |
Update README
Contains Bazel rules to fetch and install Python dependencies from a requirements.txt file.
In requirements.txt
cryptography[test, docs]==2.8 boto3==1.9.253
In WORKSPACE
rules_python_external_version = "37dad8910495ad71bae391db7a843a0f7a3ea902"
git_repository(
name = "rules_python_external",
commit = rules_python_external_version,
remote = "git@github.com:dillon-giacoppo/rules_python_external.git",
shallow_since = "1572846707 +1100",
)
load("@rules_python_external//:defs.bzl", "pip_repository")
pip_repository(
name = "py_deps",
requirements = "//:requirements.txt",
)
In BUILD
load("@py_deps//:requirements.bzl", "requirement")
py_binary(
name = "main",
srcs = ["main.py"],
deps = [
requirement("boto3"),
],
)