fix Python 3 incompatibilities in SConstruct file
This commit is contained in:
parent
3a7ffd49fd
commit
8b2f9ed382
|
@ -0,0 +1,30 @@
|
||||||
|
diff -up serf-1.3.9/SConstruct.python3 serf-1.3.9/SConstruct
|
||||||
|
--- serf-1.3.9/SConstruct.python3 2018-07-02 17:21:47.331685070 +0200
|
||||||
|
+++ serf-1.3.9/SConstruct 2018-07-02 17:27:12.316413515 +0200
|
||||||
|
@@ -20,6 +20,8 @@
|
||||||
|
# ====================================================================
|
||||||
|
#
|
||||||
|
|
||||||
|
+from __future__ import print_function
|
||||||
|
+
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
@@ -166,7 +168,7 @@ env.Append(BUILDERS = {
|
||||||
|
match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
|
||||||
|
'SERF_MINOR_VERSION ([0-9]+).*'
|
||||||
|
'SERF_PATCH_VERSION ([0-9]+)',
|
||||||
|
- env.File('serf.h').get_contents(),
|
||||||
|
+ env.File('serf.h').get_contents().decode('utf-8'),
|
||||||
|
re.DOTALL)
|
||||||
|
MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
|
||||||
|
env.Append(MAJOR=str(MAJOR))
|
||||||
|
@@ -183,7 +185,7 @@ CALLOUT_OKAY = not (env.GetOption('clean
|
||||||
|
|
||||||
|
unknown = opts.UnknownVariables()
|
||||||
|
if unknown:
|
||||||
|
- print 'Warning: Used unknown variables:', ', '.join(unknown.keys())
|
||||||
|
+ print('Warning: Used unknown variables:', ', '.join(unknown.keys()))
|
||||||
|
|
||||||
|
apr = str(env['APR'])
|
||||||
|
apu = str(env['APU'])
|
|
@ -17,6 +17,7 @@ BuildRequires: gcc, %{scons_pkg}, pkgconfig
|
||||||
BuildRequires: apr-devel, apr-util-devel, krb5-devel, openssl-devel
|
BuildRequires: apr-devel, apr-util-devel, krb5-devel, openssl-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
Patch0: %{name}-norpath.patch
|
Patch0: %{name}-norpath.patch
|
||||||
|
Patch1: %{name}-python3.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The serf library is a C-based HTTP client library built upon the Apache
|
The serf library is a C-based HTTP client library built upon the Apache
|
||||||
|
|
Loading…
Reference in New Issue