From 28d9fc7c61180dee941ab7e552047b85e42adf61 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mar 14 2017 15:06:31 +0000 Subject: Backport patch to fix broken AX_PYTHON_DEVEL (py3.6+) Signed-off-by: Igor Gnatenko --- diff --git a/0001-ax_python_devel-check-success-of-import-by-return-co.patch b/0001-ax_python_devel-check-success-of-import-by-return-co.patch new file mode 100644 index 0000000..993b0a9 --- /dev/null +++ b/0001-ax_python_devel-check-success-of-import-by-return-co.patch @@ -0,0 +1,39 @@ +From 883a2abd5af5c96be894d5ef7ee6e9a2b8e64307 Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Tue, 14 Mar 2017 15:30:00 +0100 +Subject: [PATCH] ax_python_devel: check success of import by return code + rather than by stderr + +In Python 3.7, when you have C locale it will be automatically coerced +to C.UTF-8 and warning will be printed to stderr. This breaks AX_PYTHON_DEVEL. + +Signed-off-by: Igor Gnatenko +--- + m4/ax_python_devel.m4 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4 +index d2d60c1..9487fad 100644 +--- a/m4/ax_python_devel.m4 ++++ b/m4/ax_python_devel.m4 +@@ -67,7 +67,7 @@ + # modified version of the Autoconf Macro, you may extend this special + # exception to the GPL to apply to your modified version as well. + +-#serial 19 ++#serial 20 + + AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL]) + AC_DEFUN([AX_PYTHON_DEVEL],[ +@@ -137,7 +137,7 @@ variable to configure. See ``configure --help'' for reference. + # + AC_MSG_CHECKING([for the distutils Python package]) + ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` +- if test -z "$ac_distutils_result"; then ++ if test $? -eq 0; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +-- +2.12.0 + diff --git a/autoconf-archive.spec b/autoconf-archive.spec index 0413553..e298acf 100644 --- a/autoconf-archive.spec +++ b/autoconf-archive.spec @@ -1,12 +1,12 @@ -%{!?_licensedir:%global license %%doc} - Name: autoconf-archive Version: 2016.09.16 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Autoconf Macro Archive License: GPLv3+ with exceptions URL: http://www.gnu.org/software/autoconf-archive/ Source0: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz +# http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commit;h=883a2abd5af5c96be894d5ef7ee6e9a2b8e64307 +Patch0001: 0001-ax_python_devel-check-success-of-import-by-return-co.patch BuildArch: noarch Requires: autoconf Requires(post): info @@ -46,6 +46,9 @@ fi %{_infodir}/autoconf-archive.info* %changelog +* Tue Mar 14 2017 Igor Gnatenko - 2016.09.16-3 +- Backport patch to fix broken AX_PYTHON_DEVEL (py3.6+) + * Fri Feb 10 2017 Fedora Release Engineering - 2016.09.16-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild