@@ -322,23 +322,6 @@ jobs:
322322 conda list --show-channel-urls
323323 which python
324324 python --version
325- if test "${{matrix.TARGET}}" = 'win'; then
326- echo $USERPROFILE
327- # Make platformdirs use env vars instead of registry
328- export PLATFORMDIRS_PREFER_ENV=1
329- # Provide the dirs platformdirs/pip expect
330- export PROGRAMDATA='C:\ProgramData'
331- export ALLUSERSPROFILE='C:\ProgramData'
332- export APPDATA="$USERPROFILE\AppData\Roaming"
333- export LOCALAPPDATA="$USERPROFILE\AppData\Local"
334- # Ensure they exist (best effort)
335- mkdir -p "$APPDATA/pip" "$LOCALAPPDATA/pip" || true
336- # Point pip at an empty config so it doesn't enumerate site configs
337- export PIP_CONFIG_FILE="$RUNNER_TEMP/pip-empty.ini"
338- : > "$PIP_CONFIG_FILE"
339- # Avoid exercises that trigger config discovery
340- export PIP_DISABLE_PIP_VERSION_CHECK=1
341- fi
342325 # On 3.14, we need setuptools so we can run Pyomo's setup.py
343326 conda install setuptools
344327 # Note: some pypi packages are not available through conda
@@ -371,11 +354,19 @@ jobs:
371354 if test "${{matrix.TARGET}}" == 'win'; then
372355 CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0"
373356 fi
374- # PASSES
375- pip debug
376357 # Note: this will fail the build if any installation fails (or
377358 # possibly if it outputs messages to stderr)
378359 conda install --update-deps -q -y $CONDA_DEPENDENCIES
360+ if test "${{matrix.TARGET}}" = 'win'; then
361+ echo "" > "$RUNNER_TEMP/pip-empty.ini"
362+ export PIP_CONFIG_FILE="$RUNNER_TEMP/pip-empty.ini"
363+ # persist for any subshells / subsequent steps that might run a replaced pip
364+ echo "PIP_CONFIG_FILE=$RUNNER_TEMP/pip-empty.ini" >> "$GITHUB_ENV"
365+ # belt & suspenders: set typical Windows dirs so platformdirs won't wander
366+ export PROGRAMDATA="${PROGRAMDATA:-C:\\ProgramData}"
367+ export APPDATA="${APPDATA:-$USERPROFILE\\AppData\\Roaming}"
368+ export LOCALAPPDATA="${LOCALAPPDATA:-$USERPROFILE\\AppData\\Local}"
369+ fi
379370 if test -z "${{matrix.slim}}"; then
380371 # xpress.init() (xpress 9.5.1 from conda) hangs indefinitely
381372 # on GHA/Windows under Python 3.10 and 3.11. Exclude that
@@ -445,7 +436,7 @@ jobs:
445436 echo "WARNING: $PKG is not available"
446437 fi
447438 # PANICS
448- pip debug
439+ pip list
449440 done
450441 fi
451442 # Re-try Pyomo (optional) dependencies with pip
0 commit comments