@@ -91,6 +91,17 @@ def write_wheel(out_dir, *, name, version, tag, metadata, description, contents)
9191 for header , value in metadata :
9292 filtered_metadata .append ((header , value ))
9393
94+ # The WHEEL file must contain the compatibility tags in their expanded form.
95+ # see https://packaging.python.org/en/latest/specifications/binary-distribution-format/#file-contents
96+ # see https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/#compressed-tag-sets
97+ pytag , abitag , platformtag = tag .split ("-" )
98+ expanded_tags = [
99+ "-" .join ((x , y , z ))
100+ for z in platformtag .split ("." )
101+ for y in abitag .split ("." )
102+ for x in pytag .split ("." )
103+ ]
104+
94105 return write_wheel_file (os .path .join (out_dir , wheel_name ), {
95106 ** contents ,
96107 f'{ dist_info } /entry_points.txt' : make_message ([],
@@ -106,7 +117,7 @@ def write_wheel(out_dir, *, name, version, tag, metadata, description, contents)
106117 ('Wheel-Version' , '1.0' ),
107118 ('Generator' , 'ziglang make_wheels.py' ),
108119 ('Root-Is-Purelib' , 'false' ),
109- ('Tag' , tag ),
120+ ('Tag' , expanded_tags ),
110121 ]),
111122 })
112123
@@ -178,7 +189,8 @@ def write_ziglang_wheel(out_dir, *, version, platform, archive):
178189 'lib/libcxx/LICENSE.TXT' ,
179190 'lib/libcxxabi/LICENSE.TXT' ,
180191 'lib/libunwind/LICENSE.TXT' ,
181- 'lib/libc/freebsd/COPYRIGHT' ,
192+ 'lib/libc/freebsd/COPYRIGHT' ,
193+ 'lib/libc/wasi/fts/musl-fts/COPYING' ,
182194 ]
183195 excluded_license_paths = [
184196 # not a license text; contains macros that generate license strings
@@ -275,8 +287,7 @@ def dummy(): """Dummy function for an entrypoint. Zig is executed as a side effe
275287 ('Classifier' , 'Topic :: Software Development :: Compilers' ),
276288 ('Classifier' , 'Topic :: Software Development :: Code Generators' ),
277289 ('Classifier' , 'Topic :: Software Development :: Build Tools' ),
278- ('Classifier' , 'Programming Language :: Other' ),
279- ('Classifier' , 'Programming Language :: Other Scripting Engines' ),
290+ ('Classifier' , 'Programming Language :: Zig' ),
280291 ('Project-URL' , 'Homepage, https://ziglang.org' ),
281292 ('Project-URL' , 'Source Code, https://github.com/ziglang/zig-pypi' ),
282293 ('Project-URL' , 'Bug Tracker, https://github.com/ziglang/zig-pypi/issues' ),
@@ -342,7 +353,7 @@ def get_argparser():
342353 supported_platforms = ', ' .join (sorted (ZIG_PYTHON_PLATFORMS .keys ()))
343354 description = (f"Repackage official Zig downloads as Python wheels.\n \n "
344355 f"Supported platforms: { supported_platforms } " )
345-
356+
346357 parser = argparse .ArgumentParser (prog = __file__ , description = description ,
347358 formatter_class = argparse .RawDescriptionHelpFormatter )
348359 parser .add_argument ('--version' , default = 'latest' ,
0 commit comments