Make update_constraints.sh work with pyproject.toml
Some projects started to remove python classifiers from setup.cfg and moved them to pyproject.toml. The update_constraints.sh was not updated for this and such cases the 'new-release' patches were simply not generated. This change checks if setup.cfg contain the python version classifiers and if not (PYTHON_3_VERSIONS variable is empty) then greps the list of python versions from pyproject.toml. Change-Id: I2e24eecd468c4a23f28572e7a8cfc54b1551b153 Signed-off-by: Előd Illés <elod.illes@est.tech>
This commit is contained in:
@@ -77,6 +77,9 @@ SHORTNAME=$(basename $(pwd))
|
||||
# Extract python_version information from the package metadata.
|
||||
declare -a PYTHON_3_VERSIONS
|
||||
PYTHON_3_VERSIONS=`sed -n -e 's/^.*Programming.Language.*:://p' < setup.cfg | grep "3...\?$"`
|
||||
if [[ -z "$PYTHON_3_VERSIONS" ]]; then
|
||||
PYTHON_3_VERSIONS=`sed -n -e 's/^.*Programming.Language.*:://p' < pyproject.toml | sed 's/",//g' | grep "3...\?"`
|
||||
fi
|
||||
|
||||
# Apply the PEP 503 rules to turn the dist name into a canonical form,
|
||||
# in case that's the version that appears in upper-constraints.txt. We
|
||||
|
Reference in New Issue
Block a user