From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/automake/, sys-devel/automake/files/
Date: Fri, 17 Jan 2020 11:21:33 +0000 (UTC) [thread overview]
Message-ID: <1579260071.441ee9b0ca504263e31d2ef75083e0426a7425e6.dilfridge@gentoo> (raw)
commit: 441ee9b0ca504263e31d2ef75083e0426a7425e6
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 17 11:20:34 2020 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Jan 17 11:21:11 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=441ee9b0
sys-devel/automake: Fix most tests with python-3 (2 FAIL remaining)
Bug: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32088
Bug: https://bugs.gentoo.org/705514
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
sys-devel/automake/automake-1.16.1-r2.ebuild | 3 +-
sys-devel/automake/automake-9999.ebuild | 7 +-
.../files/automake-1.16.1-py3-no-pyo-files.patch | 192 +++++++++++++++++++++
3 files changed, 200 insertions(+), 2 deletions(-)
diff --git a/sys-devel/automake/automake-1.16.1-r2.ebuild b/sys-devel/automake/automake-1.16.1-r2.ebuild
index 7ffb37a81f2..c483767b582 100644
--- a/sys-devel/automake/automake-1.16.1-r2.ebuild
+++ b/sys-devel/automake/automake-1.16.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -48,6 +48,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/automake-1.16.1-py3-compile.patch
+ "${FILESDIR}"/automake-1.16.1-py3-no-pyo-files.patch
)
pkg_setup() {
diff --git a/sys-devel/automake/automake-9999.ebuild b/sys-devel/automake/automake-9999.ebuild
index fdfa761077f..c483767b582 100644
--- a/sys-devel/automake/automake-9999.ebuild
+++ b/sys-devel/automake/automake-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -46,6 +46,11 @@ BDEPEND="
test? ( ${PYTHON_DEPS} )
"
+PATCHES=(
+ "${FILESDIR}"/automake-1.16.1-py3-compile.patch
+ "${FILESDIR}"/automake-1.16.1-py3-no-pyo-files.patch
+)
+
pkg_setup() {
use test && python-any-r1_pkg_setup
}
diff --git a/sys-devel/automake/files/automake-1.16.1-py3-no-pyo-files.patch b/sys-devel/automake/files/automake-1.16.1-py3-no-pyo-files.patch
new file mode 100644
index 00000000000..0d2ff91b620
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.16.1-py3-no-pyo-files.patch
@@ -0,0 +1,192 @@
+From: Lukas Fleischer
+Subject: python tests: Do not require .pyo files
+Date: Sun, 20 May 2018 17:28:52 +0200
+
+As of Python 3.5, but unoptimized and optimized bytecode are stored
+within .pyc files; .pyo files are no longer generated. Update the Python
+tests such that the test do not fail if .pyo files are missing.
+
+Source: https://lists.gnu.org/archive/html/automake-patches/2018-05/msg00002.html
+Reviewed-by: Andreas K. Hüttel <dilfridge@gentoo.org>
+
+* t/py-compile-basedir.sh: Remove all .pyo checks.
+* t/py-compile-basic.sh: Likewise.
+* t/py-compile-destdir.sh: Likewise.
+* t/py-compile-option-terminate.sh: Likewise.
+* t/python-virtualenv.sh: Likewise.
+* t/python10.sh: Likewise.
+* t/python12.sh: Likewise.
+* t/python3.sh: Likewise.
+---
+ t/py-compile-basedir.sh | 2 --
+ t/py-compile-basic.sh | 3 ---
+ t/py-compile-destdir.sh | 12 +++++-------
+ t/py-compile-option-terminate.sh | 5 -----
+ t/python-virtualenv.sh | 4 ----
+ t/python10.sh | 6 ------
+ t/python12.sh | 3 +--
+ t/python3.sh | 1 -
+ 8 files changed, 6 insertions(+), 30 deletions(-)
+
+diff --git a/t/py-compile-basedir.sh b/t/py-compile-basedir.sh
+index 6921d16d5..9f927d066 100644
+--- a/t/py-compile-basedir.sh
++++ b/t/py-compile-basedir.sh
+@@ -40,9 +40,7 @@ for d in foo foo/bar "$(pwd)/foo" . .. ../foo ''; do
+ ./py-compile --basedir "$d" "$f.py" "sub/$f.py"
+ find "$d2" # For debugging.
+ py_installed "$d2/$f.pyc"
+- py_installed "$d2/$f.pyo"
+ py_installed "$d2/sub/$f.pyc"
+- py_installed "$d2/sub/$f.pyo"
+ files=$(find "$d2" | grep '\.py[co]$')
+ test $(echo "$files" | wc -l) -eq 4
+ case $d2 in
+diff --git a/t/py-compile-basic.sh b/t/py-compile-basic.sh
+index 24df600cb..4c5cf57aa 100644
+--- a/t/py-compile-basic.sh
++++ b/t/py-compile-basic.sh
+@@ -61,10 +61,7 @@ mkdir -p 1/_/2/_/3/_
+
+ ./py-compile foo.py sub/bar.py 1/_/2/_/3/_/0.py
+ py_installed foo.pyc
+-py_installed foo.pyo
+ py_installed sub/bar.pyc
+-py_installed sub/bar.pyo
+ py_installed 1/_/2/_/3/_/0.pyc
+-py_installed 1/_/2/_/3/_/0.pyo
+
+ :
+diff --git a/t/py-compile-destdir.sh b/t/py-compile-destdir.sh
+index 07aa1f44f..d2ccafee5 100644
+--- a/t/py-compile-destdir.sh
++++ b/t/py-compile-destdir.sh
+@@ -34,13 +34,11 @@ echo 'def bar (): return "bar"' > $destdir/sub/bar.py
+
+ find $destdir # For debugging.
+ st=0
+-for x in c o; do
+- for b in foo sub/bar; do
+- f=$(pyc_location -p "$destdir/$b.py$x")
+- test -f "$f"
+- strings "$f" || : # For debugging.
+- $FGREP $destdir $f && { echo BAD: $f; st=1; }
+- done
++for b in foo sub/bar; do
++ f=$(pyc_location -p "$destdir/$b.pyc")
++ test -f "$f"
++ strings "$f" || : # For debugging.
++ $FGREP $destdir $f && { echo BAD: $f; st=1; }
+ done
+ exit $st
+
+diff --git a/t/py-compile-option-terminate.sh b/t/py-compile-option-terminate.sh
+index 1aaeec21b..80ae55a88 100644
+--- a/t/py-compile-option-terminate.sh
++++ b/t/py-compile-option-terminate.sh
+@@ -27,17 +27,12 @@ cp "$am_scriptdir/py-compile" . \
+ : > ./--foo.py
+ ./py-compile -- -o.py --foo.py
+ py_installed ./-o.pyc
+-py_installed ./-o.pyo
+ py_installed ./--foo.pyc
+-py_installed ./--foo.pyo
+ rm -f ./-*.py[co]
+ : > x.py
+ ./py-compile x.py -o.py --foo.py
+ py_installed ./x.pyc
+-py_installed ./x.pyo
+ py_installed ./-o.pyc
+-py_installed ./-o.pyo
+ py_installed ./--foo.pyc
+-py_installed ./--foo.pyo
+
+ :
+diff --git a/t/python-virtualenv.sh b/t/python-virtualenv.sh
+index 3bcd6ec76..7f9708866 100644
+--- a/t/python-virtualenv.sh
++++ b/t/python-virtualenv.sh
+@@ -124,10 +124,8 @@ check_install ()
+
+ test -f "$py_site"/am_foo.py
+ py_installed "$py_site"/am_foo.pyc
+- py_installed "$py_site"/am_foo.pyo
+ py_installed "$py_site"/am_virtenv/__init__.py
+ py_installed "$py_site"/am_virtenv/__init__.pyc
+- py_installed "$py_site"/am_virtenv/__init__.pyo
+ test -f "$py_site"/libquux.a
+ test -f "$py_site"/am_virtenv/libzardoz.a
+ }
+@@ -138,10 +136,8 @@ check_uninstall ()
+
+ test ! -e "$py_site"/am_foo.py
+ py_installed --not "$py_site"/am_foo.pyc
+- py_installed --not "$py_site"/am_foo.pyo
+ test ! -e "$py_site"/am_virtenv/__init__.py
+ py_installed --not "$py_site"/am_virtenv/__init__.pyc
+- py_installed --not "$py_site"/am_virtenv/__init__.pyo
+ test ! -e "$py_site"/libquux.a
+ test ! -e "$py_site"/am_virtenv/libzardoz.a
+ }
+diff --git a/t/python10.sh b/t/python10.sh
+index 4def103ff..9c7a46175 100644
+--- a/t/python10.sh
++++ b/t/python10.sh
+@@ -60,27 +60,21 @@ cwd=$(pwd) || fatal_ "getting current working directory"
+ $MAKE install
+ test -f "$inst/your/two.py"
+ py_installed "$inst/your/two.pyc"
+-py_installed "$inst/your/two.pyo"
+ py_installed --not "$inst/my/one.py"
+ py_installed --not "$inst/my/one.pyc"
+-py_installed --not "$inst/my/one.pyo"
+ $MAKE uninstall
+ py_installed --not "$inst/your/two.py"
+ py_installed --not "$inst/your/two.pyc"
+-py_installed --not "$inst/your/two.pyo"
+
+ ../configure --prefix=$cwd/"$inst" one=1
+ $MAKE install
+ py_installed --not "$inst/your/two.py"
+ py_installed --not "$inst/your/two.pyc"
+-py_installed --not "$inst/your/two.pyo"
+ test -f "$inst/my/one.py"
+ py_installed "$inst/my/one.pyc"
+-py_installed "$inst/my/one.pyo"
+ $MAKE uninstall
+ py_installed --not "$inst/my/one.py"
+ py_installed --not "$inst/my/one.pyc"
+-py_installed --not "$inst/my/one.pyo"
+
+ $MAKE disttest
+
+diff --git a/t/python12.sh b/t/python12.sh
+index d998ae8ad..cca057e6d 100644
+--- a/t/python12.sh
++++ b/t/python12.sh
+@@ -44,11 +44,10 @@ $MAKE install DESTDIR=$destdir
+
+ # Perfunctory test that the files were created.
+ test -f "$destdir/usr/share/my/my.py"
+-pyo=$(pyc_location -p "$destdir/usr/share/my/my.pyo")
+ pyc=$(pyc_location -p "$destdir/usr/share/my/my.pyc")
+
+ # If DESTDIR has made it into the byte compiled files, fail the test.
+-st=0; $FGREP "$destdir" "$pyc" "$pyo" || st=$?
++st=0; $FGREP "$destdir" "$pyc" || st=$?
+ test $st -eq 1
+
+ :
+diff --git a/t/python3.sh b/t/python3.sh
+index 0008eadd7..131aeb48d 100644
+--- a/t/python3.sh
++++ b/t/python3.sh
+@@ -42,6 +42,5 @@ cd build
+ $MAKE install
+ py_installed inst/my/one.py
+ py_installed inst/my/one.pyc
+-py_installed inst/my/one.pyo
+
+ :
+--
+2.17.0
next reply other threads:[~2020-01-17 11:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 11:21 Andreas K. Hüttel [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-01-11 18:33 [gentoo-commits] repo/gentoo:master commit in: sys-devel/automake/, sys-devel/automake/files/ Lars Wendler
2020-11-20 1:28 Thomas Deutschmann
2020-09-24 13:33 Lars Wendler
2019-11-08 9:47 Lars Wendler
2018-03-04 4:07 Thomas Deutschmann
2018-02-25 1:59 Thomas Deutschmann
2016-02-13 10:09 Mike Frysinger
2015-12-16 22:52 Mike Frysinger
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=1579260071.441ee9b0ca504263e31d2ef75083e0426a7425e6.dilfridge@gentoo \
--to=dilfridge@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