rhbz#1711638 - fails to build with Python 3.8.0a4

This commit is contained in:
Lukas Slebodnik 2019-06-03 16:52:03 +02:00
parent 8ab7d637c9
commit 0d64a975dc
2 changed files with 22 additions and 1 deletions

View File

@ -22,13 +22,14 @@
Name: libtevent
Version: 0.9.39
Release: 1%{?dist}
Release: 2%{?dist}
Summary: The tevent library
License: LGPLv3+
URL: http://tevent.samba.org/
Source: http://samba.org/ftp/tevent/tevent-%{version}.tar.gz
# Patches
Patch0001: waflib-python38-pyembed.diff
BuildRequires: gcc
BuildRequires: libtalloc-devel >= %{talloc_version}
@ -136,6 +137,9 @@ cp -a doc/man/* $RPM_BUILD_ROOT/%{_mandir}
%ldconfig_scriptlets
%changelog
* Mon Jun 03 2019 Lukas Slebodnik <lslebodn@fedoraproject.org> - 0.9.39-2
- rhbz#1711638 - fails to build with Python 3.8.0a4
* Tue Feb 26 2019 Lukas Slebodnik <lslebodn@fedoraproject.org> - 0.9.39-1
- rhbz#1683186 - New upstream release 0.9.39

View File

@ -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)