Skip to content

Commit 3506435

Browse files
authored
Fix failing pipenv installation on Windows GH actions runners (#453)
* use --pre --clear when using pipenv on windows * remove typo * try clearing lockfile first before installing * temporarily bypass pipenv install by using pipenv run pip install - temporarily switch to only running pipenv tests on only windows runners * linting / formatting * no requirements file, try pipenv install again * try pipenv graph first, also cat pipfile to look at contents * try locking with verbose output * try converting to requirements.txt * what happens on other OSes? * try including all pipenv search sources * try end-around again using reuqirements.txt * [skip render] make sed command windows-friendly * [skip render] remove sed, echo individually * [skip render] use python -m pipenv install to use conda python * [skip render] try setting pipenv python environment variable * [skip render] print path to see if there is a 32 bit python installed * [skip render] remove run: * [skip render] add checks for pipenv python path and arch * [skip render] try setting arch of python to 64 bit explicitly * [skip render] echo path from pipenv harness to see if theres another python we dont know about * [skip render] hardcode python path * [skip render] add .exe suffix * [skip render] try setting pipenv python path with .exe suffix but still using make create environment * [skip render] try pinning pipenv < 2025 * [skip render] unpin pipenv, try creating virtualenv with system python * [skip render] try pipenv install directly instead of pipenv --python * [skip render] add python executable location debugging to pipenv harness * [skip render] add pythonfinder to dev requirements * [skip render] cut down on execution time, only use pythonfinder * [skip render] typo * [skip render] try using uv rather than setup-python * [skip render] use different behavior in pipenv harness for windows runners * [skip render] use setup-python * [skip render] fix shell script syntax * [skip render] fix if block end * [skip render] revert temporary changes to debug windows runner * [skip render] more reversions
1 parent 86152dd commit 3506435

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ jobs:
115115
pipenv --version
116116
which virtualenv
117117
virtualenv --version
118+
which python
119+
python --version
120+
python -c "import platform; print(f'Python architecture: {platform.architecture()}')"
118121
119122
- name: Run tests
120123
run: |

tests/pipenv_harness.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,15 @@ source $CCDS_ROOT/test_functions.sh
2121
# navigate to the generated project and run make commands
2222
cd $1
2323
make
24-
make create_environment
24+
25+
# GitHub-hosted Windows runners using setup-python have 32-bit versions of Python
26+
# installed (see #452). We can test the make command on non-Windows systems,
27+
# but on Windows we should ensure we use the system python
28+
if [[ "$RUNNER_OS" == "Windows" ]]; then
29+
pipenv --python $(shell where python).exe
30+
else
31+
make create_environment
32+
fi
2533

2634
# can happen outside of environment since pipenv knows based on Pipfile
2735
make requirements

0 commit comments

Comments
 (0)