python: Update to 3.9.5

All the dropped changes seem no longer be needed (static is off by default,
the cygwin patch for .exe is upstream)
This commit is contained in:
Christoph Reiter
2021-05-15 14:51:26 +02:00
parent d1e178a865
commit 1a870d7858
4 changed files with 3 additions and 126 deletions

View File

@@ -1,31 +0,0 @@
--- Python-3.2.3-orig/Modules/getpath.c 2012-04-11 02:54:07.000000000 -0400
+++ Python-3.2.3/Modules/getpath.c 2012-06-14 13:33:30.179375000 -0400
@@ -491,6 +491,28 @@
break;
}
+#ifdef __CYGWIN__
+ /*
+ * Cygwin automatically removes the ".exe" extension from argv[0]
+ * to make programs feel like they are in a more Unix-like
+ * environment. Unfortunately, this can make it problemmatic for
+ * Cygwin to distinguish between a directory and an executable with
+ * the same name excluding the ".exe" extension. For example, the
+ * Cygwin Python build directory has a "Python" directory and a
+ * "python.exe" executable. This causes isxfile() to erroneously
+ * return false. If isdir() returns true and there is enough space
+ * to append the ".exe" extension, then we try again with the
+ * extension appended.
+ */
+#define EXE L".exe"
+ if (isdir(program_full_path) && wcslen(program_full_path) + wcslen(EXE) <= MAXPATHLEN)
+ {
+ wcscat(program_full_path, EXE);
+ if (isxfile(program_full_path))
+ break;
+ }
+#endif /* __CYGWIN__ */
+
if (!delim) {
program_full_path[0] = L'\0';
break;

View File

@@ -1,78 +0,0 @@
From fb93392b0f4975a02775a608611dc9ceb20c06ad Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Mon, 18 Jan 2010 17:59:07 +0000
Subject: [PATCH] 00111: Don't try to build a libpythonMAJOR.MINOR.a
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Downstream only: not appropriate for upstream.
See https://bugzilla.redhat.com/show_bug.cgi?id=556092
Co-authored-by: David Malcolm <dmalcolm@redhat.com>
Co-authored-by: Bohuslav Kabrda <bkabrda@redhat.com>
Co-authored-by: Matej Stuchlik <mstuchli@redhat.com>
Co-authored-by: Robert Kuska <rkuska@redhat.com>
Co-authored-by: Charalampos Stratakis <cstratak@redhat.com>
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
---
Makefile.pre.in | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 406a441082..917303dd92 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -562,7 +562,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir)
# Build the interpreter
-$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
+$(BUILDPYTHON): Programs/python.o $(LDLIBRARY) $(PY3LIBRARY)
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
platform: $(BUILDPYTHON) pybuilddir.txt
@@ -610,12 +610,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
-
-# Build static library
-$(LIBRARY): $(LIBRARY_OBJS)
- -rm -f $@
- $(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS)
-
libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS)
if test $(INSTSONAME) != $(LDLIBRARY); then \
$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
@@ -693,7 +687,7 @@ Makefile Modules/config.c: Makefile.pre \
@echo "The Makefile was updated, you may need to re-run make."
-Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
+Programs/_testembed: Programs/_testembed.o $(LDLIBRARY) $(PY3LIBRARY)
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
############################################################################
@@ -1557,17 +1551,6 @@ libainstall: @DEF_MAKE_RULE@ python-config
else true; \
fi; \
done
- @if test -d $(LIBRARY); then :; else \
- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
- if test "$(SHLIB_SUFFIX)" = .dll; then \
- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
- else \
- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
- fi; \
- else \
- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
- fi; \
- fi
$(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
$(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o
$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
--
2.24.1

View File

@@ -140,14 +140,6 @@ diff -Naur Python-3.8.2-orig/config.guess Python-3.8.2/config.guess
;;
--- Python-3.8.7.orig/Lib/ctypes/__init__.py 2020-12-21 17:25:24.000000000 +0100
+++ Python-3.8.7/Lib/ctypes/__init__.py 2021-05-11 22:26:25.866873900 +0200
@@ -1,6 +1,6 @@
"""create and manipulate C data types in Python"""
-import os as _os, sys as _sys
+import os as _os, sys as _sys, sysconfig as _sysconfig
__version__ = "1.1.0"
@@ -456,7 +456,7 @@
if _os.name == "nt":
pythonapi = PyDLL("python dll", None, _sys.dllhandle)

View File

@@ -3,7 +3,7 @@
pkgbase=python
pkgname=('python' 'python-devel')
pkgver=3.8.10
pkgver=3.9.5
pkgrel=1
_pybasever=${pkgver%.*}
pkgdesc="Next generation of the python high-level scripting language"
@@ -26,7 +26,6 @@ makedepends=(
)
source=(https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz
001-3.1-enable-new-dtags.patch
002-3.2-getpath-exe-extension.patch
003-3.4-select-cygwin.patch
005-3.7-ctypes-cygwin.patch
006-3.7-ftm.patch
@@ -39,7 +38,6 @@ source=(https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz
013-3.8-tkinter-cygwin.patch
014-3.8-xxsubinterpreters-cygwin.patch
015-rpath.patch
016-no-static-lib.patch
025-MINGW-compiler-customize-mingw-cygwin-compilers.patch
026-3.7-mpdec-msys.patch
027-install-import-library.patch
@@ -49,9 +47,8 @@ source=(https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz
940-rebase-python-dll.patch
950-rebase-dlls.patch
960-fix-parallel-make.patch)
sha256sums=('6af24a66093dd840bcccf371d4044a3027e655cf24591ce26e48022bc79219d9'
sha256sums=('0c5a140665436ec3dbfbb79e2dfb6d192655f26ef4a29aeffcb6d1820d716d83'
'be96ddaca58a39ddaf1e3e5bb7900b34c0e6d00e9b64c4e0f8a3565a74a44e84'
'4044827af3cf0e91a8ddd44cd588f17ea4e17619512edd299b5688ec6e112ad4'
'82cfafc5b31ad4c9bb4c9786044c39c75762dbc2656abdfdc433c23fee69c02f'
'f0bb75ca69c63894fc43e0f8218c9dbcc746935bf5ea095a724e6fb2f5dcc566'
'098a756dfdb69b43bece4efe9d53a4f6ffc05a9a19a3d48854de787e69fc453c'
@@ -64,11 +61,10 @@ sha256sums=('6af24a66093dd840bcccf371d4044a3027e655cf24591ce26e48022bc79219d9'
'4c6d9d786da1673208b0ef2bc3340e1acf08ce861b49193eb1592c53c3a4bd26'
'e48c719be36cb266ac3ceae834739fb1faae6740524cd672fd367f9304894a39'
'437332e1a7195dd0adcd505ecdeab5c3a7a793efdd7fea7bec55f97957bb8934'
'43aac098b3a6e2b7806653e51f923b25b7afbf93e0e01c94846c5f749a81f5de'
'5b1083e9b50e149d623d863dee38ac1fb8d142f1bb78c8a01dcb09bfd97f4118'
'fc6164a90f0ca2a9341aaf4448b4334c3393459ca5cbad6d7149f8bcf70da5fe'
'b4042475c5c75e0b4c7c08ccad2891eb8098c066c5ba524a988a0519102e8e5d'
'4ea589b58daa03e8cd9a6f4e95851e5edeb9e04f2eb1771fe9a624efb7bdf047'
'fead37f619cb76e0fde66acdc13abee74e89c8f4797e0b21e0cca014ee2ecabe'
'85d9d042e0fa3493ec54b364e6b4fb6d2b12ba09641e01047bc84a09605ef76b'
'17e4ac1b5f0fa8a6c410fb80d1ad99ec9185efef51b8450a31932b553c354ed1'
'b439ff4f0a1f13858f8fb596414b74ed2c14fc3103d90287bb8e461ee89288b9'
@@ -91,7 +87,6 @@ prepare() {
apply_patch_with_msg \
001-3.1-enable-new-dtags.patch \
002-3.2-getpath-exe-extension.patch \
003-3.4-select-cygwin.patch \
005-3.7-ctypes-cygwin.patch \
006-3.7-ftm.patch \
@@ -104,7 +99,6 @@ prepare() {
013-3.8-tkinter-cygwin.patch \
014-3.8-xxsubinterpreters-cygwin.patch \
015-rpath.patch \
016-no-static-lib.patch \
025-MINGW-compiler-customize-mingw-cygwin-compilers.patch \
026-3.7-mpdec-msys.patch \
027-install-import-library.patch \