kumquat-buildroot/package/python3/0031-fix-building-on-older-distributions.patch
Peter Korsgaard ce81a6e6d2 package/python3: bump version to 3.9.9
Drop 0030-Fix-cross-compiling-the-uuid-module.patch as the patched code has
been reworked upstream and python3 is built with --disable-uuid:

91a51c5ffc

Rework 0033-configure.ac-fixup-CC-print-multiarch-output-for-mus.patch as
the MULTIARCH code is now conditional on !darwin:

9901d153c2

Refresh and renumber remaining patches.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-12-16 20:07:37 +01:00

39 lines
1.3 KiB
Diff

From c9548b8e80eecdd6d0798817698c77649f005b42 Mon Sep 17 00:00:00 2001
From: Adam Duskett <aduskett@gmail.com>
Date: Thu, 16 Aug 2018 14:52:37 -0700
Subject: [PATCH] fix building on older distributions
Python > 3.6.3 calls os.replace in the update_file.py script, during the
regen-importlib phase of the build process.
According to Doc/whatsnew/3.3.rst line 1631, os.replace acts in the same
way as os.rename, however, it is now cross-platform compatible for Windows.
Because BuildRoot is guaranteed only to be built in POSIX environment, it is
safe to change os.replace back to os.rename.
This change fixes building on older systems such as CentOS7, that only come
with python 2.
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
Tools/scripts/update_file.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Tools/scripts/update_file.py b/Tools/scripts/update_file.py
index 224585c69b..ef458c0c63 100644
--- a/Tools/scripts/update_file.py
+++ b/Tools/scripts/update_file.py
@@ -16,7 +16,7 @@ def main(old_path, new_path):
with open(new_path, 'rb') as f:
new_contents = f.read()
if old_contents != new_contents:
- os.replace(new_path, old_path)
+ os.rename(new_path, old_path)
else:
os.unlink(new_path)
--
2.20.1