Skip to content

Commit

Permalink
build sdist script
Browse files Browse the repository at this point in the history
  • Loading branch information
atemerev committed Feb 6, 2024
1 parent 5e95dd3 commit 359ab5c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions ci/python_build_sdist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

# build the sdist file, and try installing it

set -euo pipefail

BASE=$(pwd)/build/

mkdir -p "$BASE"

VENV="$BASE/venv-python-sdist/"
if [[ ! -d "$VENV" ]]; then
python3 -mvenv "$VENV"
fi
BIN="$VENV/bin/"

set +u # ignore missing variables in activation script
source "$BIN/activate"
set -u

"$BIN/pip" install -U setuptools pip twine
"$BIN/python" setup.py sdist

ls -al dist

cd "$VENV"
"$BIN/pip" --verbose install ../../dist/*.tar.gz

0 comments on commit 359ab5c

Please sign in to comment.