Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .plzconfig
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ Optional = true
Inherit = true
Help = The tool used to resolve wheels with using the pypi API.

[PluginConfig "wheel_dist_info"]
ConfigKey = WheelDistInfo
Type = bool
DefaultValue = false
Optional = true
Inherit = true
Help = Controls whether python_wheel outputs the module's .dist-info directory by default.

[PluginConfig "prereleases"]
DefaultValue = false
Type = bool
Expand Down
8 changes: 6 additions & 2 deletions build_defs/python.build_defs
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,10 @@ def python_wheel(name:str, version:str, labels:list=[], hashes:list=None, packag
"""
binary = binary or entry_points
package_name = package_name or name.replace('-', '_')
if not outs:
outs = [name]
if CONFIG.PYTHON.WHEEL_DIST_INFO:
outs += [f"{package_name}-{version}.dist-info"]
initial = package_name[0]
url_base = repo or CONFIG.PYTHON.WHEEL_REPO
if not tool and not url_base:
Expand Down Expand Up @@ -667,7 +671,7 @@ def python_wheel(name:str, version:str, labels:list=[], hashes:list=None, packag
cmd += [
# N.B. we need -b for legacy locations because that's all zipimport knows to look for :(
'$TOOLS_PYTHON -m compileall -b -f .',
'$TOOLS_ARCAT z -d --prefix $PKG -i ' + ' -i '.join(outs or [name]),
'$TOOLS_ARCAT z -d --prefix $PKG -i ' + ' -i '.join(outs),
]
label = f'whl:{package_name}=={version}'

Expand Down Expand Up @@ -704,7 +708,7 @@ def python_wheel(name:str, version:str, labels:list=[], hashes:list=None, packag
name = name,
tag = "lib_rule" if binary else None,
srcs = [wheel_rule],
outs = outs or [name],
outs = outs,
tools = [CONFIG.ARCAT_TOOL],
cmd = cmd,
deps = deps,
Expand Down