From 64a2a7d89d2fbb6eade0727ff472ef2072e101dd Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Mon, 3 Jun 2019 16:43:47 +0200 Subject: [PATCH] rhbz#1711638 - fails to build with Python 3.8.0a4 --- libtalloc.spec | 6 +++++- waflib-python38-pyembed.diff | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 waflib-python38-pyembed.diff diff --git a/libtalloc.spec b/libtalloc.spec index c73f238..2d52000 100644 --- a/libtalloc.spec +++ b/libtalloc.spec @@ -18,13 +18,14 @@ Name: libtalloc Version: 2.1.16 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The talloc library License: LGPLv3+ URL: https://talloc.samba.org/ Source: https://www.samba.org/ftp/talloc/talloc-%{version}.tar.gz # Patches +Patch0001: waflib-python38-pyembed.diff BuildRequires: gcc BuildRequires: libxslt @@ -163,6 +164,9 @@ cp -a doc/man/* $RPM_BUILD_ROOT/%{_mandir} %endif %changelog +* Mon Jun 03 2019 Lukas Slebodnik - 2.1.16-2 +- rhbz#1711638 - fails to build with Python 3.8.0a4 + * Tue Feb 26 2019 Lukas Slebodnik - 2.1.16-1 - rhbz#1683211 - libtalloc-2.1.16 is available diff --git a/waflib-python38-pyembed.diff b/waflib-python38-pyembed.diff new file mode 100644 index 0000000..04e001b --- /dev/null +++ b/waflib-python38-pyembed.diff @@ -0,0 +1,17 @@ +diff --git a/third_party/waf/waflib/Tools/python.py b/third_party/waf/waflib/Tools/python.py +index 52a05c6..79836bb 100644 +--- a/third_party/waf/waflib/Tools/python.py ++++ b/third_party/waf/waflib/Tools/python.py +@@ -338,7 +338,11 @@ def check_python_headers(conf, features='pyembed pyext'): + + if 'pyembed' in features: + for flags in all_flags: +- conf.check_cfg(msg='Asking python-config for pyembed %r flags' % ' '.join(flags), path=env.PYTHON_CONFIG, package='', uselib_store='PYEMBED', args=flags) ++ embedflags = flags + ['--embed'] ++ try: ++ conf.check_cfg(msg='Asking python-config for pyembed %r flags' % ' '.join(embedflags), path=env.PYTHON_CONFIG, package='', uselib_store='PYEMBED', args=embedflags) ++ except conf.errors.ConfigurationError: ++ conf.check_cfg(msg='Asking python-config for pyembed %r flags' % ' '.join(flags), path=env.PYTHON_CONFIG, package='', uselib_store='PYEMBED', args=flags) + + try: + conf.test_pyembed(xx)