Skip to content

Commit

Permalink
fixup! common/hooks/pre-pkg/04-generate-provides: generate provides f…
Browse files Browse the repository at this point in the history
…or python modules
  • Loading branch information
classabbyamp authored and ahesford committed Dec 4, 2024
1 parent f665be2 commit 57c8802
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions common/hooks/pre-pkg/04-generate-provides.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 57c8802

Please sign in to comment.