| 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() |