From: "Jeroen Roovers" <jer@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libnl/, dev-libs/libnl/files/
Date: Sun, 20 Sep 2020 13:01:31 +0000 (UTC) [thread overview]
Message-ID: <1600606890.517511aef659389b22436c428726f022d1f74c9b.jer@gentoo> (raw)
commit: 517511aef659389b22436c428726f022d1f74c9b
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 20 13:00:52 2020 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Sep 20 13:01:30 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=517511ae
dev-libs/libnl: Fix python byte-compiling
Package-Manager: Portage-3.0.7, Repoman-3.0.1
Fixes: 78ae57786c33fa78e0932185e30a8a0ab9faa75f
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
dev-libs/libnl/files/libnl-99999999-2to3.patch | 42 ++++++++++++++++++++++++++
dev-libs/libnl/libnl-99999999.ebuild | 28 +++++++++++------
2 files changed, 61 insertions(+), 9 deletions(-)
diff --git a/dev-libs/libnl/files/libnl-99999999-2to3.patch b/dev-libs/libnl/files/libnl-99999999-2to3.patch
new file mode 100644
index 00000000000..66a16406d78
--- /dev/null
+++ b/dev-libs/libnl/files/libnl-99999999-2to3.patch
@@ -0,0 +1,42 @@
+--- a/python/netlink/route/links/bridge.py
++++ b/python/netlink/route/links/bridge.py
+@@ -6,7 +6,7 @@
+
+ """
+
+-from __future__ import absolute_import
++
+
+ from ... import core as netlink
+ from .. import capi as capi
+@@ -19,10 +19,10 @@
+
+ def bridge_assert_ext_info(self):
+ if self._has_ext_info == False:
+- print """
++ print("""
+ Please update your kernel to be able to call this method.
+ Your current kernel bridge version is too old to support this extention.
+- """
++ """)
+ raise RuntimeWarning()
+
+ def port_state2str(self, state):
+--- a/doc/resolve-asciidoc-refs.py
++++ b/doc/resolve-asciidoc-refs.py
+@@ -22,4 +22,4 @@
+
+ rc = re.compile('|'.join(map(re.escape, sorted(refs, reverse=True))))
+ for line in open(sys.argv[1], 'r'):
+- print rc.sub(translate, line),
++ print(rc.sub(translate, line), end=' ')
+--- a/doc/doxygen-link.py
++++ b/doc/doxygen-link.py
+@@ -1,6 +1,6 @@
+ #!/usr/bin/env python
+
+-from __future__ import print_function
++
+ import fileinput
+ import re
+ import sys
diff --git a/dev-libs/libnl/libnl-99999999.ebuild b/dev-libs/libnl/libnl-99999999.ebuild
index 52f318b2f91..cf078de887a 100644
--- a/dev-libs/libnl/libnl-99999999.ebuild
+++ b/dev-libs/libnl/libnl-99999999.ebuild
@@ -5,7 +5,7 @@ EAPI=7
PYTHON_COMPAT=( python3_{6,7,8} )
DISTUTILS_OPTIONAL=1
-inherit autotools distutils-r1 git-r3 libtool multilib multilib-minimal
+inherit autotools distutils-r1 git-r3 multilib-minimal
DESCRIPTION="Libraries providing APIs to netlink protocol based Linux kernel interfaces"
HOMEPAGE="http://www.infradead.org/~tgr/libnl/ https://github.com/thom311/libnl"
@@ -23,19 +23,16 @@ DEPEND="
"
BDEPEND="
${RDEPEND}
- python? ( dev-lang/swig )
sys-devel/bison
sys-devel/flex
+ python? ( dev-lang/swig )
"
-
REQUIRED_USE="
python? ( ${PYTHON_REQUIRED_USE} )
"
-
DOCS=(
ChangeLog
)
-
MULTILIB_WRAPPED_HEADERS=(
# we do not install CLI stuff for non-native
/usr/include/libnl3/netlink/cli/addr.h
@@ -51,6 +48,9 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/libnl3/netlink/cli/tc.h
/usr/include/libnl3/netlink/cli/utils.h
)
+PATCHES=(
+ "${FILESDIR}"/${PN}-99999999-2to3.patch
+)
src_prepare() {
default
@@ -58,8 +58,9 @@ src_prepare() {
eautoreconf
if use python; then
- cd "${S}"/python || die
+ pushd "${S}"/python > /dev/null || die
distutils-r1_src_prepare
+ popd > /dev/null || die
fi
# out-of-source build broken
@@ -72,15 +73,17 @@ multilib_src_configure() {
$(multilib_native_use_enable utils cli) \
$(use_enable debug) \
$(use_enable static-libs static) \
- $(use_enable threads)
+ $(use_enable threads) \
+ --disable-doc
}
multilib_src_compile() {
default
if multilib_is_native_abi && use python; then
- cd python || die
+ pushd python > /dev/null || die
distutils-r1_src_compile
+ popd > /dev/null || die
fi
}
@@ -90,8 +93,15 @@ multilib_src_install() {
if multilib_is_native_abi && use python; then
# Unset DOCS= since distutils-r1.eclass interferes
local DOCS=()
- cd python || die
+
+ pushd python > /dev/null || die
+
distutils-r1_src_install
+
+ # For no obvious reason this is not done automatically
+ python_foreach_impl python_optimize
+
+ popd > /dev/null || die
fi
}
next reply other threads:[~2020-09-20 13:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-20 13:01 Jeroen Roovers [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-04-21 23:02 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libnl/, dev-libs/libnl/files/ Sam James
2022-04-16 2:09 Sam James
2015-08-19 5:11 Jeroen Roovers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1600606890.517511aef659389b22436c428726f022d1f74c9b.jer@gentoo \
--to=jer@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox