rhbz#1711638 - fails to build with Python 3.8.0a4

This commit is contained in:
Lukas Slebodnik 2019-06-03 16:40:34 +02:00
parent a8224d1d3b
commit 6be35fecdd
2 changed files with 22 additions and 1 deletions

View File

@ -18,13 +18,14 @@
Name: libtdb
Version: 1.3.18
Release: 1%{?dist}
Release: 2%{?dist}
Summary: The tdb library
License: LGPLv3+
URL: http://tdb.samba.org/
Source: http://samba.org/ftp/tdb/tdb-%{version}.tar.gz
# Patches
Patch0001: waflib-python38-pyembed.diff
BuildRequires: gcc
BuildRequires: libxslt
@ -130,6 +131,9 @@ make install DESTDIR=$RPM_BUILD_ROOT
%ldconfig_scriptlets
%changelog
* Mon Jun 03 2019 Lukas Slebodnik <lslebodn@fedoraproject.org> - 1.3.18-2
- rhbz#1711638 - fails to build with Python 3.8.0a4
* Tue Feb 26 2019 Lukas Slebodnik <lslebodn@fedoraproject.org> - 1.3.18-1
- rhbz#1683185 - libtdb-1.3.18 is available

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)