Backport patch to fix broken AX_PYTHON_DEVEL (py3.6+)

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
Igor Gnatenko 2017-03-14 16:06:31 +01:00
parent 1e9bdc08ea
commit 28d9fc7c61
2 changed files with 45 additions and 3 deletions

View File

@ -0,0 +1,39 @@
From 883a2abd5af5c96be894d5ef7ee6e9a2b8e64307 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <ignatenko@redhat.com>
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 <ignatenko@redhat.com>
---
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

View File

@ -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 <ignatenko@redhat.com> - 2016.09.16-3
- Backport patch to fix broken AX_PYTHON_DEVEL (py3.6+)
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2016.09.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild