@@ -108,8 +108,7 @@ jobs:
108
108
109
109
# Add homogeneous TOML support (Python >= 3.12 has standard tomllib)
110
110
$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
113
112
$CONDA install -y -n "$CONDA_ENV" `cat requires.txt`
114
113
rm -f requires.txt
115
114
done
@@ -265,8 +264,7 @@ jobs:
265
264
# Python versioneer fails to compute the current version correctly otherwise
266
265
git config --global --add safe.directory $(Resolve-Path '.' | % {$_.toString()})
267
266
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
270
268
271
269
# Install the Python requirements
272
270
Get-Content .\requires.txt `
@@ -349,8 +347,7 @@ jobs:
349
347
git config --global --add safe.directory $(realpath .)
350
348
# Install tomli for Python < 3.11
351
349
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
354
351
pip install `cat requires.txt`
355
352
rm -f requires.txt
356
353
- name : Setup and Install Test Requirements
0 commit comments