1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00
Files
github-octodns/script/cibuild-setup-py
Ross McFarland 0086206f53 Rework cibuild-setup-py to build a pkg and install & test it
pip env doesn't seem to like `python setup install`ing thing into it
anymore and prints a bunch of deprecation warnings and something is
already broken, at least w/google modules, that prevents them from
loading afterwards
2024-04-18 09:50:22 -07:00

24 lines
932 B
Bash
Executable File

#!/bin/sh
set -e
cd "$(dirname "$0")/.."
VERSION="$(grep "^__version__" "./octodns/__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 build setuptools
echo "## environment & versions ######################################################"
python --version
pip --version
echo "## validate setup.py build #####################################################"
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
echo "## complete ####################################################################"