Skip to content

Commit

Permalink
fixup! common/hooks/pre-pkg/06-verify-python-deps: add hook
Browse files Browse the repository at this point in the history
  • Loading branch information
classabbyamp authored and ahesford committed Dec 4, 2024
1 parent 7f77cda commit f665be2
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions common/hooks/pre-pkg/06-verify-python-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,14 @@
# This hook executes the following tasks:
# - Verifies python module dependencies from dist-info's METADATA and egg-info's PKG-INFO

py3_cmd() {
env PYTHONPATH="${XBPS_MASTERDIR}/${py3_sitelib}-bootstrap" "${py3_bin}" "$@"
}

hook() {
local py3_bin="${XBPS_MASTERDIR}/usr/bin/python3"
local -a _pydeps=()

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 \
-S "${PKGDESTDIR}/${py3_sitelib}" -v "${pkgver}" depends \
${NOCOLORS:+-C} ${XBPS_STRICT:+-s} -e "${python_extras}" \
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 \
${NOCOLORS:+-C} ${XBPS_STRICT:+-s} -S "${PKGDESTDIR}/${py3_sitelib}" -v "${pkgver}" \
depends -e "${python_extras}" \
-V <( $XBPS_QUERY_XCMD -R -p provides -s "py3:" ) -D "${PKGDESTDIR}/rdeps" \
|| msg_error "$pkgver: failed to verify python module dependencies\n"
fi
Expand Down

0 comments on commit f665be2

Please sign in to comment.