diff --git a/common/hooks/pre-pkg/04-generate-provides.sh b/common/hooks/pre-pkg/04-generate-provides.sh index 80c2142d83333d..f095854d434268 100644 --- a/common/hooks/pre-pkg/04-generate-provides.sh +++ b/common/hooks/pre-pkg/04-generate-provides.sh @@ -3,16 +3,12 @@ # This hook executes the following tasks: # - Generates provides file with provides entries for xbps-create(1) -py3_cmd() { - env PYTHONPATH="${XBPS_MASTERDIR}/${py3_sitelib}-bootstrap" "${py3_bin}" "$@" -} - generate_python_provides() { local py3_bin="${XBPS_MASTERDIR}/usr/bin/python3" - if [ -z "$nopyprovides" ] && [ -d "${PKGDESTDIR}/${py3_sitelib}" ] && \ - [ -x "${py3_bin}" ] && py3_cmd -c "import packaging"; then - py3_cmd "${XBPS_COMMONDIR}"/scripts/parse-py-metadata.py \ + if [ -z "$nopyprovides" ] && [ -d "${PKGDESTDIR}/${py3_sitelib}" ] && [ -x "${py3_bin}" ]; then + PYTHONPATH="${XBPS_MASTERDIR}/${py3_sitelib}-bootstrap" "${py3_bin}" \ + "${XBPS_COMMONDIR}"/scripts/parse-py-metadata.py \ -S "${PKGDESTDIR}/${py3_sitelib}" -v "${pkgver}" provides fi }