Merge pull request #1831 from anton-petrov/master

Hook script to add latest suffix for install command
This commit is contained in:
Anton Petrov 2021-02-27 09:25:16 +03:00 committed by GitHub
commit dde9a31f2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,7 @@
DEFINITION_PREFIX="${DEFINITION%%:*}"
DEFINITION_TYPE="${DEFINITION_PREFIX%%-*}" # TODO: support non-CPython versions
if [[ "${DEFINITION}" != "${DEFINITION_PREFIX}" ]]; then
DEFINITION_CANDIDATES=($(python-build --definitions | grep -F "${DEFINITION_PREFIX}" | grep "^${DEFINITION_TYPE}" | sed -e '/-dev$/d' -e '/-src$/d' | sort -t. -k1,1r -k 2,2nr -k 3,3nr || true))
DEFINITION="${DEFINITION_CANDIDATES}"
VERSION_NAME="${DEFINITION##*/}"
fi