Annotation of pkgsrc/lang/python27/patches/patch-Lib_distutils_command_install__egg__info.py, revision 1.2
1.2 ! schmonz 1: $NetBSD: patch-Lib_distutils_command_install__egg__info.py,v 1.1 2020/08/21 19:39:28 schmonz Exp $
1.1 schmonz 2:
3: On systems where both of the conditions
4:
5: 1. LD_LIBRARY_PATH does _not_ take precedence over DT_RPATH
6: (e.g. Linux)
7: 2. A previous libpython with the same major.minor is already installed
8: (e.g. a previous version of this package)
9:
10: hold, the built python will be linked with the installed libpython,
11: causing it to report an old teeny version in
12: self.distribution.get_version() while staging the install. Then "make
13: package" fails with PLIST mismatches for Python-2.7.XX-py2.7.egg-info.
14:
15: pkgsrc knows which version we're building. Pass that down instead.
16:
17: In patch-Lib_distutils_unixccompiler.py, we override Python maintainers'
18: expectations for Linux builds in favor of pkgsrc's expectations for
19: builds on all platforms. This patch is needed because of that patch.
20:
21: --- Lib/distutils/command/install_egg_info.py.orig 2020-04-19 21:13:39.000000000 +0000
22: +++ Lib/distutils/command/install_egg_info.py
1.2 ! schmonz 23: @@ -21,9 +21,13 @@ class install_egg_info(Command):
1.1 schmonz 24:
25: def finalize_options(self):
26: self.set_undefined_options('install_lib',('install_dir','install_dir'))
1.2 ! schmonz 27: + distribution_name = self.distribution.get_name()
! 28: + distribution_version = self.distribution.get_version()
! 29: + if distribution_name == "Python":
! 30: + distribution_version = "@PKGVERSION_NOREV@"
1.1 schmonz 31: basename = "%s-%s-py%s.egg-info" % (
1.2 ! schmonz 32: - to_filename(safe_name(self.distribution.get_name())),
1.1 schmonz 33: - to_filename(safe_version(self.distribution.get_version())),
1.2 ! schmonz 34: + to_filename(safe_name(distribution_name)),
1.1 schmonz 35: + to_filename(safe_version(distribution_version)),
36: sys.version[:3]
37: )
38: self.target = os.path.join(self.install_dir, basename)
CVSweb <webmaster@jp.NetBSD.org>