#4 Remove 00178-dont-duplicate-flags-in-sysconfig.patch
Merged 3 years ago by churchyard. Opened 3 years ago by vstinner.
rpms/ vstinner/python3.7 master  into  master

@@ -1,48 +0,0 @@ 

- From ee6c6f1ba7496f22036e4b0c1af7cd737d246efe Mon Sep 17 00:00:00 2001

- From: Bohuslav Kabrda <bkabrda@redhat.com>

- Date: Fri, 19 Jun 2020 16:11:14 +0200

- Subject: [PATCH] 00178: Don't duplicate various FLAGS in sysconfig values

- 

- http://bugs.python.org/issue17679

- 

- Co-Authored-By: Bohuslav Kabrda <bkabrda@redhat.com>

- ---

-  Lib/distutils/sysconfig.py | 5 ++++-

-  Lib/sysconfig.py           | 5 ++++-

-  2 files changed, 8 insertions(+), 2 deletions(-)

- 

- diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py

- index 3ce0dc1645..acf223dd16 100644

- --- a/Lib/distutils/sysconfig.py

- +++ b/Lib/distutils/sysconfig.py

- @@ -374,7 +374,10 @@ def parse_makefile(fn, g=None):

-                      done[n] = item = ""

-                  if found:

-                      after = value[m.end():]

- -                    value = value[:m.start()] + item + after

- +                    value = value[:m.start()]

- +                    if item.strip() not in value:

- +                        value += item

- +                    value += after

-                      if "$" in after:

-                          notdone[name] = value

-                      else:

- diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py

- index 159c78bb99..a1096c6951 100644

- --- a/Lib/sysconfig.py

- +++ b/Lib/sysconfig.py

- @@ -295,7 +295,10 @@ def _parse_makefile(filename, vars=None):

-  

-                  if found:

-                      after = value[m.end():]

- -                    value = value[:m.start()] + item + after

- +                    value = value[:m.start()]

- +                    if item.strip() not in value:

- +                        value += item

- +                    value += after

-                      if "$" in after:

-                          notdone[name] = value

-                      else:

- -- 

- 2.26.2

- 

file modified
+6 -8
@@ -17,7 +17,7 @@ 

  %global prerel rc1

  %global upstream_version %{general_version}%{?prerel}

  Version: %{general_version}%{?prerel:~%{prerel}}

- Release: 1%{?dist}

+ Release: 2%{?dist}

  License: Python

  

  
@@ -252,12 +252,6 @@ 

  # See https://bugzilla.redhat.com/show_bug.cgi?id=614680

  Patch170: 00170-gc-assertions.patch

  

- # 00178 #

- # Don't duplicate various FLAGS in sysconfig values

- # http://bugs.python.org/issue17679

- # Does not affect python2 AFAICS (different sysconfig values initialization)

- Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch

- 

  # 00189 #

  # Instead of bundled wheels, use our RPM packaged wheels from

  # /usr/share/python-wheels
@@ -610,7 +604,6 @@ 

  %patch111 -p1

  %patch155 -p1

  %patch170 -p1

- %patch178 -p1

  

  %if %{with rpmwheels}

  %patch189 -p1
@@ -1529,6 +1522,11 @@ 

  # ======================================================

  

  %changelog

+ * Thu Jun 25 2020 Victor Stinner <vstinner@python.org> - 3.7.8~rc1-2

+ - Remove downstream 00178-dont-duplicate-flags-in-sysconfig.patch which

+   introduced a bug on distutils.sysconfig.get_config_var('LIBPL')

+   (rhbz#1851008).

+ 

  * Fri Jun 19 2020 Petr Viktorin <pviktori@redhat.com> - 3.7.8~rc1-1

  - Update to 3.7.8rc1

  

Remove downstream 00178-dont-duplicate-flags-in-sysconfig.patch which
introduced a bug on distutils.sysconfig.get_config_var('LIBPL').

Resolves: rhbz#1851008

The patch 178 was already removed from the Python 3.8 package to fix the same bug:

Note: I wrote this PR from scratch (not using git cherry-pick nor ferrypick).

We've already removed this on Python 3.8, right?

We've already removed this on Python 3.8, right?

I haven't seen your comment when posting this. The answer is yes.

Build succeeded.

Before:

<mock-chroot> sh-5.0# python3.7 -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"
/usr/lib64/python3.7/config-m-x86_64-linux-gnu

After:

<mock-chroot> sh-5.0# python3.7 -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"
/usr/lib64/python3.7/config-3.7m-x86_64-linux-gnu

Pull-Request has been merged by churchyard

3 years ago

I'm building this and I've updated https://github.com/fedora-python/cpython/tree/fedora-3.7

Will ask the reporter whether we can backport this together with 3.7.8.