@@ -108,8 +108,7 @@ jobs:
108108
109109 # Add homogeneous TOML support (Python >= 3.12 has standard tomllib)
110110 $CONDA install -y -n "$CONDA_ENV" tomli
111- $CONDA run --no-capture-output -n "$CONDA_ENV" python -c \
112- "import tomli; from functools import reduce; fp = open('pyproject.toml', 'rb'); p = tomli.load(fp); fp.close(); print(' '.join(reduce(lambda x, y: x + y, list(p['project']['optional-dependencies'].values()), p['project']['dependencies'])))" > requires.txt
111+ $CONDA run --no-capture-output -n "$CONDA_ENV" python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" > requires.txt
113112 $CONDA install -y -n "$CONDA_ENV" `cat requires.txt`
114113 rm -f requires.txt
115114 done
@@ -265,8 +264,7 @@ jobs:
265264 # Python versioneer fails to compute the current version correctly otherwise
266265 git config --global --add safe.directory $(Resolve-Path '.' | % {$_.toString()})
267266 python -m pip install setuptools
268- python -c `
269- "import tomllib; from functools import reduce; fp = open('pyproject.toml', 'rb'); p = tomllib.load(fp); fp.close(); print('\n'.join(reduce(lambda x, y: x + y, list(p['project']['optional-dependencies'].values()), p['project']['dependencies'])))" > requires.txt
267+ python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" -s "\n" > requires.txt
270268
271269 # Install the Python requirements
272270 Get-Content .\requires.txt `
@@ -349,8 +347,7 @@ jobs:
349347 git config --global --add safe.directory $(realpath .)
350348 # Install tomli for Python < 3.11
351349 pip install tomli
352- python -c \
353- "import tomli; from functools import reduce; fp = open('pyproject.toml', 'rb'); p = tomli.load(fp); fp.close(); print(' '.join(reduce(lambda x, y: x + y, list(p['project']['optional-dependencies'].values()), p['project']['dependencies'])))" > requires.txt
350+ python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" > requires.txt
354351 pip install `cat requires.txt`
355352 rm -f requires.txt
356353 - name : Setup and Install Test Requirements
0 commit comments