blob: fbbe0821f793204905a060907f25557a6ed3824a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
$NetBSD: patch-Lib_distutils_command_install__egg__info.py,v 1.2 2020/08/22 13:01:42 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,13 @@ class install_egg_info(Command):
def finalize_options(self):
self.set_undefined_options('install_lib',('install_dir','install_dir'))
+ distribution_name = self.distribution.get_name()
+ distribution_version = self.distribution.get_version()
+ if distribution_name == "Python":
+ 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_name(distribution_name)),
+ to_filename(safe_version(distribution_version)),
sys.version[:3]
)
self.target = os.path.join(self.install_dir, basename)
|