Fix packaging script to handle WASM module

This commit is contained in:
jaseg 2025-12-18 00:04:35 +01:00
parent 5893ef234e
commit c04ae73986
2 changed files with 6 additions and 4 deletions

View file

@ -79,16 +79,18 @@ def do_release(dry_run):
for path in files:
path = root / path
out_path = plugin_dir / path.relative_to(module_sources)
content = path.read_text()
if path.name == '__init__.py':
content = path.read_text()
lines = content.splitlines()
lines_out = []
for line in lines:
if line.startswith('__version__ = version('):
line = f'__version__ = {version!r}'
lines_out.append(line)
content = '\n'.join(lines_out)
out_path.write_text(content)
content = '\n'.join(lines_out).encode('utf-8')
else:
content = path.read_bytes()
out_path.write_bytes(content)
zip_fn = Path(shutil.make_archive(f'{pkg_dir.name}-v{version}', 'zip', pkg_dir, '.'))
if not dry_run:

2
uv.lock generated
View file

@ -569,7 +569,7 @@ wheels = [
[[package]]
name = "kicoil"
version = "0.10.0"
version = "0.11.0"
source = { editable = "." }
dependencies = [
{ name = "beautifulsoup4" },