summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-03-14 17:49:13 +0100
committerMichał Górny <mgorny@gentoo.org>2020-03-16 08:35:49 +0100
commite1e92875f9a233e4264edd1c8560052512e4fa7d (patch)
tree9844630a05f77776858a8a003fbc0ff2d63bb9cd /eclass
parentpython-utils-r1.eclass: Do not create 'python.pc' wrapper (diff)
downloadgentoo-e1e92875f9a233e4264edd1c8560052512e4fa7d.tar.gz
gentoo-e1e92875f9a233e4264edd1c8560052512e4fa7d.tar.bz2
gentoo-e1e92875f9a233e4264edd1c8560052512e4fa7d.zip
python-utils-r1.eclass: Create python3-embed.pc wrapper
Closes: https://bugs.gentoo.org/712526 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/python-utils-r1.eclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 28314d5135d0..f144cbbb1279 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -978,7 +978,7 @@ python_wrapper_setup() {
# Clean up, in case we were supposed to do a cheap update.
rm -f "${workdir}"/bin/python{,2,3}{,-config} || die
rm -f "${workdir}"/bin/2to3 || die
- rm -f "${workdir}"/pkgconfig/python{2,3}.pc || die
+ rm -f "${workdir}"/pkgconfig/python{2,3}{,-embed}.pc || die
local EPYTHON PYTHON
python_export "${impl}" EPYTHON PYTHON
@@ -1022,6 +1022,12 @@ python_wrapper_setup() {
# Python 2.7+.
ln -s "${EPREFIX}"/usr/$(get_libdir)/pkgconfig/${EPYTHON/n/n-}.pc \
"${workdir}"/pkgconfig/python${pyver}.pc || die
+
+ # Python 3.8+.
+ if [[ ${EPYTHON} != python[23].[67] ]]; then
+ ln -s "${EPREFIX}"/usr/$(get_libdir)/pkgconfig/${EPYTHON/n/n-}-embed.pc \
+ "${workdir}"/pkgconfig/python${pyver}-embed.pc || die
+ fi
else
nonsupp+=( 2to3 python-config "python${pyver}-config" )
fi