@@ -105,9 +105,12 @@ jobs:
105105 do
106106 # Since Python 3.13, setuptools is not installed automatically anymore
107107 $CONDA install -y -n "$CONDA_ENV" setuptools
108- $CONDA run --no-capture-output -n "$CONDA_ENV" python setup.py egg_info
109- $CONDA install -y -n "$CONDA_ENV" `grep -v "^\[" khiops.egg-info/requires.txt`
110- rm -rf khiops.egg-info
108+
109+ # Add homogeneous TOML support (Python >= 3.12 has standard tomllib)
110+ $CONDA install -y -n "$CONDA_ENV" tomli
111+ $CONDA run --no-capture-output -n "$CONDA_ENV" python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" > requires.txt
112+ $CONDA install -y -n "$CONDA_ENV" `cat requires.txt`
113+ rm -f requires.txt
111114 done
112115 - name : Configure Expensive Tests Setting
113116 # Skip expensive tests by default, unless on the `dev`, `dev-v10` or `main` branches
@@ -252,23 +255,21 @@ jobs:
252255 id : setup-python
253256 uses : actions/setup-python@v5
254257 with :
255- python-version : ' 3.11 '
258+ python-version : ' 3.12 '
256259 - name : Install khiops-python dev dependencies
257260 shell : pwsh
258261 run : |
259262 # The following git command is required,
260263 # as the Git repository is in a directory the current user does not own,
261264 # Python versioneer fails to compute the current version correctly otherwise
262265 git config --global --add safe.directory $(Resolve-Path '.' | % {$_.toString()})
263- python setup.py egg_info
266+ python -m pip install setuptools
267+ python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" -s "\n" > requires.txt
264268
265269 # Install the Python requirements
266- Get-Content .\khiops.egg-info\requires.txt `
267- | Select-String -Pattern '^\[' -NotMatch `
268- | Select-String -Pattern '^$' -NotMatch `
269- | % {$_.Line} `
270+ Get-Content .\requires.txt `
270271 | ForEach-Object {python -m pip install $_.toString()}
271- Remove-Item -r - force khiops.egg-info
272+ Remove-Item -force requires.txt
272273 - name : Setup and Install Test Requirements
273274 run : python -m pip install -r test-requirements.txt
274275 - name : Test Khiops Integration
@@ -344,9 +345,11 @@ jobs:
344345 # as the Git repository is in a directory the current user does not own,
345346 # Python versioneer fails to compute the current version correctly otherwise
346347 git config --global --add safe.directory $(realpath .)
347- python setup.py egg_info
348- pip install `grep -v "^\[" khiops.egg-info/requires.txt`
349- rm -rf khiops.egg-info
348+ # Install tomli for Python < 3.11
349+ pip install tomli
350+ python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" > requires.txt
351+ pip install `cat requires.txt`
352+ rm -f requires.txt
350353 - name : Setup and Install Test Requirements
351354 run : |
352355 pip install -r test-requirements.txt
0 commit comments