Skip to content

Commit 1aeba2a

Browse files
committed
Generate wheel at build time instead of checking in
1 parent ed83e95 commit 1aeba2a

6 files changed

Lines changed: 29 additions & 4 deletions

File tree

test/license_expression_repo/third_party/python/BUILD_FILE

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,25 @@ package(
88
},
99
)
1010

11-
# A local "package index" directory containing a single fixture wheel whose METADATA only
12-
# declares a PEP 639 `License-Expression:` field (no legacy `License:` or `Classifier: License`),
13-
# to exercise pip_library's auto-detection of that field.
11+
# Builds a fixture wheel from plain-text sources whose METADATA only declares a PEP 639
12+
# `License-Expression:` field (no legacy `License:` or `Classifier: License`), to exercise
13+
# pip_library's auto-detection of that field.
14+
genrule(
15+
name = "fakepkg_whl",
16+
srcs = [
17+
"fakepkg_src/fakepkg/__init__.py",
18+
"fakepkg_src/fakepkg-1.0.0.dist-info/METADATA",
19+
"fakepkg_src/fakepkg-1.0.0.dist-info/WHEEL",
20+
"fakepkg_src/fakepkg-1.0.0.dist-info/RECORD",
21+
],
22+
outs = ["fakepkg-1.0.0-py3-none-any.whl"],
23+
cmd = "cd $PKG/fakepkg_src && $TOOLS_ARCAT z -d -i . -o $OUT",
24+
tools = {"arcat": [CONFIG.ARCAT_TOOL]},
25+
)
26+
1427
genrule(
1528
name = "wheelhouse",
16-
srcs = ["wheelhouse/fakepkg-1.0.0-py3-none-any.whl"],
29+
srcs = [":fakepkg_whl"],
1730
cmd = "mkdir -p wheelhouse && cp $SRCS wheelhouse/",
1831
output_dirs = ["wheelhouse"],
1932
)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Metadata-Version: 2.4
2+
Name: fakepkg
3+
Version: 1.0.0
4+
License-Expression: MIT
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fakepkg/__init__.py,,
2+
fakepkg-1.0.0.dist-info/METADATA,,
3+
fakepkg-1.0.0.dist-info/WHEEL,,
4+
fakepkg-1.0.0.dist-info/RECORD,,
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Wheel-Version: 1.0
2+
Generator: fixture
3+
Root-Is-Purelib: true
4+
Tag: py3-none-any

test/license_expression_repo/third_party/python/fakepkg_src/fakepkg/__init__.py

Whitespace-only changes.
Binary file not shown.

0 commit comments

Comments
 (0)