Skip to content

Commit e611b6c

Browse files
Create README
0 parents  commit e611b6c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# rules_python_external
2+
3+
Contains Bazel rules to fetch and install Python dependencies from a requirements.txt file.
4+
5+
## Usage
6+
7+
In `requirements.txt`
8+
```
9+
cryptography[test, docs]
10+
boto3
11+
```
12+
13+
In `WORKSPACE`
14+
```
15+
load("@rules_pip//:defs.bzl", "pip_repository")
16+
17+
pip_repository(
18+
name = "py_deps",
19+
requirements = "//:requirements.txt",
20+
)
21+
```
22+
23+
In `BUILD`
24+
```
25+
load("@py_deps//:requirements.bzl", "requirement")
26+
27+
py_binary(
28+
name = "main",
29+
srcs = ["main.py"],
30+
deps = [
31+
requirement("boto3"),
32+
],
33+
)
34+
```

0 commit comments

Comments
 (0)