8000 Merge branch 'master' of https://github.com/bazelbuild/rules_python · bazel-contrib/rules_python@fe6502e · GitHub
[go: up one dir, main page]

Skip to content

Commit fe6502e

Browse files
author
Marian Dvorsky
committed
2 parents b4d1e5d + 38f86fb commit fe6502e

File tree

37 files changed

+772
-299
lines changed

37 files changed

+772
-299
lines changed

.bazelci/presubmit.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@
44
# TODO(#144): When Bazel 0.29 is released, the docgen workflow will work, and
55
# we can go back to using `...` for build_targets.
66
---
7+
buildifier:
8+
version: latest
9+
warnings: "all"
710
all_targets: &all_targets
811
build_targets:
912
- "//examples/..."
1013
- "//experimental/..."
1114
- "//packaging/..."
1215
- "//python/..."
16+
- "//tests/..."
1317
- "//tools/..."
18+
# As a regression test for #225, check that wheel targets still build when
19+
# their package path is qualified with the repo name.
20+
- "@rules_python//experimental/examples/..."
1421
test_targets:
1522
- "..."
1623
platforms:

BUILD

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,20 @@ package(default_visibility = ["//visibility:public"])
1515

1616
licenses(["notice"]) # Apache 2.0
1717

18-
exports_files(["LICENSE"])
18+
exports_files([
19+
"LICENSE",
20+
"version.bzl",
21+
])
22+
23+
filegroup(
24+
name = "distribution",
25+
srcs = [
26+
"BUILD",
27+
"LICENSE",
28+
"internal_deps.bzl",
29+
"internal_setup.bzl",
30+
"//python:distribution",
31+
"//tools:distribution",
32+
],
33+
visibility = ["//distro:__pkg__"],
34+
)

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,43 @@ use GitHub pull requests for this purpose. Consult [GitHub Help] for more
2222
information on using pull requests.
2323

2424
[GitHub Help]: https://help.github.com/articles/about-pull-requests/
25+
26+
## Generated files
27+
28+
Some checked-in files are generated and need to be updated when a new PR is
29+
merged.
30+
31+
### Documentation
32+
33+
To regenerate the content under the `docs/` directory, run this script in the
34+
repository root:
35+
36+
```shell
37+
./update_docs.sh
38+
```
39+
40+
This needs to be done whenever the docstrings in the corresponding .bzl files
41+
are changed; see `docs/BUILD`.
42+
43+
### Precompiled tools
44+
45+
The packaging rules depend on two precompiled binaries, `tools/piptool.par` and
46+
`tools/whltool.par`. We need these to be precompiled because they are invoked
47+
during `WORKSPACE` evaluation, before Bazel itself is able to build anything
48+
from source. The .par files can be regenerated by running this script in the
49+
repository root:
50+
51+
```shell
52+
# You can pass --nodocker if Docker is not available on your system.
53+
./update_tools.sh
54+
```
55+
56+
This needs to be done whenever the corresponding sources in the `packaging/`
57+
directory are updated.
58+
59+
Since these are binary files and therefore unreviewable, for security
60+
reasons<sup>1</sup> we will regenerate the .par files for you when merging your
61+
pull request.
62+
63+
<sup>1</sup> See "[Reflections on Trusting Trust](https://en.wikipedia.org/wiki/Backdoor_(computing)#Compiler_backdoors)".
64+

0 commit comments

Comments
 (0)
0