#45 Fix python3-config --configdir
Merged 3 years ago by churchyard. Opened 3 years ago by vstinner.
rpms/ vstinner/python37 libpl_lib64  into  master

Fix python3-config --configdir
Victor Stinner • 3 years ago  
@@ -1,12 +1,16 @@ 

- diff -up Python-3.5.0/Makefile.pre.in.lib Python-3.5.0/Makefile.pre.in

- --- Python-3.5.0/Makefile.pre.in.lib	2015-09-21 15:39:47.928286620 +0200

- +++ Python-3.5.0/Makefile.pre.in	2015-09-21 15:42:58.004042762 +0200

- @@ -1340,7 +1340,7 @@ inclinstall:

-  

-  # Install the library and miscellaneous stuff needed for extending/embedding

-  # This goes into $(exec_prefix)

- -LIBPL=		@LIBPL@

- +LIBPL=		$(LIBDEST)/config-$(LDVERSION)-$(MULTIARCH)

-  

-  # pkgconfig directory

-  LIBPC=		$(LIBDIR)/pkgconfig

+ diff --git a/configure.ac b/configure.ac

+ index 01c66fe..1e6d515 100644

+ --- a/configure.ac

+ +++ b/configure.ac

+ @@ -4772,9 +4772,9 @@ AC_MSG_RESULT($LDVERSION)

+  dnl define LIBPL after ABIFLAGS and LDVERSION is defined.

+  AC_SUBST(PY_ENABLE_SHARED)

+  if test x$PLATFORM_TRIPLET = x; then

+ -  LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"

+ +  LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}"

+  else

+ -  LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"

+ +  LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"

+  fi

+  AC_SUBST(LIBPL)

+ 

file modified
+4 -1
@@ -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

  

  
@@ -1535,6 +1535,9 @@ 

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

  

  %changelog

+ * Fri Apr 03 2020 Victor Stinner <vstinner@python.org> - 3.7.7-2

+ - Fix python3-config --configdir (rhbz#1772988).

+ 

  * Tue Mar 10 2020 Marcel Plch <mplch@redhat.com> - 3.7.7-1

  - Update to 3.7.7 final

  

00205-make-libpl-respect-lib64.patch only modified LIBPL in
Makefile.pre.in which leads to an inconsistency in
python3-config --configdir which uses the unmodified LIBPL (use
/usr/lib instead of /usr/lib64).

Rewrite the patch to update LIBPL in configure.ac instead, as it is
done in Python 3.8 patch.

Resolves: rhbz#1772988

Rewrite the patch to update LIBPL in configure.ac instead, as it is done in Python 3.8 patch.

Search for the configure.ac change in the Python 3.8 patch:
https://src.fedoraproject.org/rpms/python3/blob/master/f/00102-lib64.patch

00102-lib64.patch was fixed to solve https://bugzilla.redhat.com/show_bug.cgi?id=1710767 :

commit 7aab0ddc87c4c8476c8077800e765e52480fbc4d
Author: Miro Hrončok <miro@hroncok.cz>
Date:   Fri May 17 13:24:33 2019 +0200

    Remove Patch178, merge Patch205 into Patch102

    Fixes invalid value of distutils.sysconfig.get_config_var('LIBPL').

    Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1710767

    GitHub PR: https://github.com/fedora-python/cpython/pull/2

Oh well, who is this Hrončok who did that? I seriously don't remember that :D

Pull-Request has been merged by churchyard

3 years ago

Ouch. I've missed a 32bit build failure. Will need to revert this for now, sorry. See https://src.fedoraproject.org/rpms/python3.7/pull-request/1

Ouch. I've missed a 32bit build failure. Will need to revert this for now, sorry. See
https://src.fedoraproject.org/rpms/python3.7/pull-request/1

Thanks for the revert. Don't worry.

I proposed https://src.fedoraproject.org/rpms/python3.7/pull-request/2 which should fix 32-bit builds.