mirror of
https://github.com/hexedtech/codemp.git
synced 2024-12-23 05:14:54 +01:00
chore(python): local build script for pypi publish.
to publish save the pypi token locally.
This commit is contained in:
parent
4be0e3481b
commit
69d2c471e2
1 changed files with 2 additions and 25 deletions
27
dist/py/build.sh
vendored
27
dist/py/build.sh
vendored
|
@ -4,28 +4,5 @@ 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 build -i "$PYO3_PYTHON" --out "$WHEEL_DIR"
|
||||
|
||||
echo "\nAUTOINSTALL - REMOVE AFTER TESTING\n"
|
||||
|
||||
CODEMPSUBLIME_DIR="../../../codemp-sublime/"
|
||||
CODEMPTEST_DIR="../../../codemp-python-test/"
|
||||
|
||||
wheels=($WHEEL_DIR/*.whl)
|
||||
for wheel in $wheels; do
|
||||
echo "moving $wheel to $CODEMPSUBLIME_DIR"
|
||||
cp $wheel "$CODEMPSUBLIME_DIR/bindings/"
|
||||
cp $wheel "$CODEMPTEST_DIR"
|
||||
done
|
||||
|
||||
pushd "$CODEMPTEST_DIR"
|
||||
source .venv/bin/activate
|
||||
pip install $wheel --force-reinstall
|
||||
deactivate
|
||||
popd
|
||||
|
||||
pushd "$CODEMPSUBLIME_DIR"
|
||||
source .venv/bin/activate
|
||||
pip install $wheel --force-reinstall
|
||||
deactivate
|
||||
popd
|
||||
MATURIN_PYPI_TOKEN="$(cat ~/.local/secrets/pypi_token)" maturin publish -i "$PYO3_PYTHON" \
|
||||
--out "$WHEEL_DIR" --non-interactive --repository "pypi"
|
||||
|
|
Loading…
Reference in a new issue