Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework cibuild-setup-py to build a pkg and install & test it #81

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions script/cibuild-setup-py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ set -e

cd "$(dirname "$0")/.."

VERSION="$(grep "^__version__" "./octodns_ns1/__init__.py" | sed -e "s/.* = '//" -e "s/'$//")"

echo "## create test venv ############################################################"
TMP_DIR=$(mktemp -d -t ci-XXXXXXXXXX)
python3 -m venv $TMP_DIR
. "$TMP_DIR/bin/activate"
pip install setuptools
pip install build setuptools
echo "## environment & versions ######################################################"
python --version
pip --version
echo "## validate setup.py build #####################################################"
python setup.py build
echo "## validate setup.py install ###################################################"
python setup.py install
python -m build --sdist --wheel
echo "## validate wheel install ###################################################"
pip install dist/*$VERSION*.whl
echo "## validate tests can run against installed code ###############################"
pip install pytest pytest-network
pytest --disable-network
Expand Down
Loading