feat(python): build wheels with manual specified __init__.py

fix(python): remove build script, not needed anymore
This commit is contained in:
cschen 2024-09-10 19:09:54 +02:00
parent 9b586ed938
commit 7aa9fbb518
5 changed files with 9 additions and 9 deletions

1
.gitignore vendored
View file

@ -6,6 +6,7 @@
# python # python
.venv .venv
wheels/ wheels/
dist/py/build.sh
# lua # lua
dist/lua/*.so dist/lua/*.so

8
dist/py/build.sh vendored
View file

@ -1,8 +0,0 @@
ROOT_DIR="$(pwd)"
WHEEL_DIR="$ROOT_DIR/wheels"
PYO3_PYTHON="$(pyenv which python)"
TARGET_EXT="$($PYO3_PYTHON -c 'import sysconfig; print(sysconfig.get_config_var("EXT_SUFFIX"))')"
MATURIN_PYPI_TOKEN="$(cat ~/.local/secrets/pypi_codemp_token)" maturin publish -i "$PYO3_PYTHON" \
--out "$WHEEL_DIR" --non-interactive --repository "pypi"

View file

@ -1,6 +1,6 @@
[project] [project]
name = "codemp" name = "codemp"
version = "0.0.7" version = "0.0.8"
description = "code multiplexer" description = "code multiplexer"
requires-python = ">= 3.8" requires-python = ">= 3.8"
license = "GPL-3.0-only" license = "GPL-3.0-only"
@ -30,4 +30,6 @@ build-backend = "maturin"
[tool.maturin] [tool.maturin]
features = ["python", "pyo3/extension-module"] features = ["python", "pyo3/extension-module"]
manifest-path = "../../Cargo.toml" manifest-path = "../../Cargo.toml"
python-source = "src"

5
dist/py/src/codemp/__init__.py vendored Normal file
View file

@ -0,0 +1,5 @@
from .codemp import *
__doc__ = codemp.__doc__
if hasattr(codemp, "__all__"):
__all__ = codemp.__all__