From e8a33bd87aef999a6bc4a8f7f97b627df1641c03 Mon Sep 17 00:00:00 2001 From: Christoph Sieber Date: Fri, 3 Jan 2025 15:29:07 +0100 Subject: [PATCH 1/2] script/cibuild-setup-py: install all dev requirements for testing install all requirements stored in requirements-dev instead of only a short hardcoded list --- script/cibuild-setup-py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/cibuild-setup-py b/script/cibuild-setup-py index 48c6878..3549918 100755 --- a/script/cibuild-setup-py +++ b/script/cibuild-setup-py @@ -18,6 +18,6 @@ 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 +pip install -r requirements-dev.txt pytest --disable-network echo "## complete ####################################################################" From 4a93121f0e940eacd7099b6a7d2f362ec7b1f971 Mon Sep 17 00:00:00 2001 From: Christoph <43646576+z-bsod@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:17:31 +0100 Subject: [PATCH 2/2] cibuild-setup-py install test dependencies from setup.py / built wheel file before running pytest --- script/cibuild-setup-py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/cibuild-setup-py b/script/cibuild-setup-py index 3549918..955cd8c 100755 --- a/script/cibuild-setup-py +++ b/script/cibuild-setup-py @@ -18,6 +18,10 @@ python -m build --sdist --wheel echo "## validate wheel install ###################################################" pip install dist/*$VERSION*.whl echo "## validate tests can run against installed code ###############################" -pip install -r requirements-dev.txt +# filename needs to resolved independently as pip requires quoting and doesn't support +# wildcards when installing extra requirements +# (see: https://pip.pypa.io/en/stable/user_guide/#installing-from-wheels) +wheel_file=$(ls dist/*$VERSION*.whl) +pip install "${wheel_file}[test]" pytest --disable-network echo "## complete ####################################################################"