net-libs/serf: inherit python-any-r1 for scons, bump EAPI
[gentoo.git] / net-libs / serf / files / serf-1.3.9-python3_byte.patch
1 From 9d30108b630b77f732ef94d1642b159066ffd890 Mon Sep 17 00:00:00 2001
2 From: Andreas Stieger <astieger@apache.org>
3 Date: Wed, 8 Nov 2017 17:05:28 +0000
4 Subject: [PATCH] Follow-up to r1811083, fix building with scons 3.0.0 and
5  Python3
6
7 * SConstruct: Append decode('utf-8) to FILE.get_contents() to avoid
8   TypeError: cannot use a string pattern on a bytes-like object
9
10
11 git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1814604 13f79535-47bb-0310-9956-ffa450edef68
12 ---
13  SConstruct | 2 +-
14  1 file changed, 1 insertion(+), 1 deletion(-)
15
16 diff --git a/SConstruct b/SConstruct
17 index 5f5036b..71e5b0a 100644
18 --- a/SConstruct
19 +++ b/SConstruct
20 @@ -182,7 +182,7 @@ env.Append(BUILDERS = {
21  match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
22                    'SERF_MINOR_VERSION ([0-9]+).*'
23                    'SERF_PATCH_VERSION ([0-9]+)',
24 -                  env.File('serf.h').get_contents(),
25 +                  env.File('serf.h').get_contents().decode('utf-8'),
26                    re.DOTALL)
27  MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
28  env.Append(MAJOR=str(MAJOR))