Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/python27 Pass down PKGVERSION_NOREV in another sp...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/46107d4f8c0c
branches:  trunk
changeset: 437358:46107d4f8c0c
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Fri Aug 21 19:39:28 2020 +0000

description:
Pass down PKGVERSION_NOREV in another spot to avoid another PLIST
mismatch (for Python-2.7.XX-py2.7.egg-info) on Linux systems with a
previous version of this package installed.

diffstat:

 lang/python27/Makefile                                                  |   3 +-
 lang/python27/distinfo                                                  |   3 +-
 lang/python27/patches/patch-Lib_distutils_command_install__egg__info.py |  34 ++++++++++
 3 files changed, 38 insertions(+), 2 deletions(-)

diffs (72 lines):

diff -r 62a857efd510 -r 46107d4f8c0c lang/python27/Makefile
--- a/lang/python27/Makefile    Fri Aug 21 16:44:11 2020 +0000
+++ b/lang/python27/Makefile    Fri Aug 21 19:39:28 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.86 2020/08/14 19:28:43 schmonz Exp $
+# $NetBSD: Makefile,v 1.87 2020/08/21 19:39:28 schmonz Exp $
 
 .include "dist.mk"
 
@@ -184,6 +184,7 @@
 SUBST_CLASSES+=                pkgversion
 SUBST_STAGE.pkgversion=        pre-configure
 SUBST_FILES.pkgversion=        Lib/lib2to3/pgen2/driver.py
+SUBST_FILES.pkgversion+=Lib/distutils/command/install_egg_info.py
 SUBST_VARS.pkgversion= PKGVERSION_NOREV
 
 .include "options.mk"
diff -r 62a857efd510 -r 46107d4f8c0c lang/python27/distinfo
--- a/lang/python27/distinfo    Fri Aug 21 16:44:11 2020 +0000
+++ b/lang/python27/distinfo    Fri Aug 21 19:39:28 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.75 2020/08/15 12:35:56 schmonz Exp $
+$NetBSD: distinfo,v 1.76 2020/08/21 19:39:28 schmonz Exp $
 
 SHA1 (Python-2.7.18.tar.xz) = 678d4cf483a1c92efd347ee8e1e79326dc82810b
 RMD160 (Python-2.7.18.tar.xz) = 40a514bb05c9e631454ea8466e28f5bb229428ad
@@ -9,6 +9,7 @@
 SHA1 (patch-Lib_ctypes_util.py) = 6fa516c7b43f08992427a0afcbe80c17bcc070f1
 SHA1 (patch-Lib_distutils_command_build__ext.py) = ea4feba4e93dbcff07050c82a00d591bb650e934
 SHA1 (patch-Lib_distutils_command_install.py) = e6aef090b444b455fe351308d251e670329b7dc3
+SHA1 (patch-Lib_distutils_command_install__egg__info.py) = 94716025231f5fb25436a4fa741e802ff284f98d
 SHA1 (patch-Lib_distutils_unixccompiler.py) = db16c9aca2f29730945f28247b88b18828739bbb
 SHA1 (patch-Lib_distutils_util.py) = 5bcfad96f8e490351160f1a7c1f4ece7706a33fa
 SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 5d6dab14197f27363394ff1aeee22a8ced8026d2
diff -r 62a857efd510 -r 46107d4f8c0c lang/python27/patches/patch-Lib_distutils_command_install__egg__info.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python27/patches/patch-Lib_distutils_command_install__egg__info.py   Fri Aug 21 19:39:28 2020 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-Lib_distutils_command_install__egg__info.py,v 1.1 2020/08/21 19:39:28 schmonz Exp $
+
+On systems where both of the conditions
+
+1. LD_LIBRARY_PATH does _not_ take precedence over DT_RPATH
+   (e.g. Linux)
+2. A previous libpython with the same major.minor is already installed
+   (e.g. a previous version of this package)
+
+hold, the built python will be linked with the installed libpython,
+causing it to report an old teeny version in
+self.distribution.get_version() while staging the install. Then "make
+package" fails with PLIST mismatches for Python-2.7.XX-py2.7.egg-info.
+
+pkgsrc knows which version we're building. Pass that down instead.
+
+In patch-Lib_distutils_unixccompiler.py, we override Python maintainers'
+expectations for Linux builds in favor of pkgsrc's expectations for
+builds on all platforms. This patch is needed because of that patch.
+
+--- Lib/distutils/command/install_egg_info.py.orig     2020-04-19 21:13:39.000000000 +0000
++++ Lib/distutils/command/install_egg_info.py
+@@ -21,9 +21,10 @@ class install_egg_info(Command):
+ 
+     def finalize_options(self):
+         self.set_undefined_options('install_lib',('install_dir','install_dir'))
++        distribution_version = "@PKGVERSION_NOREV@"
+         basename = "%s-%s-py%s.egg-info" % (
+             to_filename(safe_name(self.distribution.get_name())),
+-            to_filename(safe_version(self.distribution.get_version())),
++            to_filename(safe_version(distribution_version)),
+             sys.version[:3]
+         )
+         self.target = os.path.join(self.install_dir, basename)



Home | Main Index | Thread Index | Old Index