python 3.13.0-1
This commit is contained in:
parent
1956a6858d
commit
e79f944c9b
55
PKGBUILD
55
PKGBUILD
@ -5,7 +5,7 @@
|
||||
|
||||
# Maintainer: Future Linux Team <future_linux@163.com>
|
||||
pkgname=python
|
||||
pkgver=3.12.7
|
||||
pkgver=3.13.0
|
||||
pkgrel=1
|
||||
pkgdesc="The Python programming language"
|
||||
arch=('x86_64')
|
||||
@ -14,46 +14,47 @@ license=('PSF-2.0')
|
||||
depends=('bzip2' 'expat' 'gdbm' 'libffi' 'libxcrypt' 'openssl' 'zlib' 'tzdata')
|
||||
makedepedns=('sqlite')
|
||||
source=(https://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz
|
||||
https://www.python.org/ftp/python/doc/${pkgver}/python-${pkgver}-docs-html.tar.bz2
|
||||
${pkgname}-3.12.2-site-packages-lib64.patch)
|
||||
sha256sums=(24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550
|
||||
9f2792b63230a4ea5f68b800bca87707ce6c7e69da66e1610bc2385a7da9281a
|
||||
83f0e0d43173057e1b29d503ab0479d24ada51aadf8b62e2d484b95d211478f5)
|
||||
https://www.python.org/ftp/python/doc/${pkgver}/python-${pkgver}-docs-html.tar.bz2
|
||||
${pkgname}-3.13.0-site-packages-lib64.patch)
|
||||
sha256sums=(086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d
|
||||
057b7a993102fccca3481be413d69d3a4812c35d6daf3381146dc6119007abac
|
||||
050fbeaf4a4fcfda518cbdd1eeca238b066ccaad8aef99173f3647c6113518f9)
|
||||
|
||||
prepare() {
|
||||
cd Python-${pkgver}
|
||||
cd Python-${pkgver}
|
||||
|
||||
patch -Np1 -i ${srcdir}/${pkgname}-3.12.2-site-packages-lib64.patch
|
||||
patch -Np1 -i ${srcdir}/${pkgname}-3.13.0-site-packages-lib64.patch
|
||||
|
||||
rm -r Modules/expat
|
||||
}
|
||||
|
||||
build() {
|
||||
cd Python-${pkgver}
|
||||
cd Python-${pkgver}
|
||||
|
||||
CFLAGS="${CFLAGS/-O2/-O3} -ffat-lto-objects"
|
||||
CFLAGS="${CFLAGS/-O2/-O3} -ffat-lto-objects"
|
||||
|
||||
${CONFIGURE} \
|
||||
--enable-shared \
|
||||
--with-system-expat \
|
||||
--with-dbmliborder=gdbm:ndbm \
|
||||
--with-platlibdir=lib64 \
|
||||
--enable-ipv6 \
|
||||
--enable-optimizations \
|
||||
--without-ensurepip \
|
||||
--with-lto \
|
||||
--with-build-python \
|
||||
--enable-loadable-sqlite-extensions \
|
||||
--with-tzpath=/usr/share/zoneinfo
|
||||
${CONFIGURE} \
|
||||
--enable-shared \
|
||||
--with-system-expat \
|
||||
--with-dbmliborder=gdbm:ndbm \
|
||||
--with-platlibdir=lib64 \
|
||||
--enable-ipv6 \
|
||||
--enable-optimizations \
|
||||
--without-ensurepip \
|
||||
--with-lto \
|
||||
--with-build-python \
|
||||
--enable-loadable-sqlite-extensions \
|
||||
--with-tzpath=/usr/share/zoneinfo
|
||||
|
||||
make
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd Python-${pkgver}
|
||||
cd Python-${pkgver}
|
||||
|
||||
make DESTDIR=${pkgdir} install
|
||||
make DESTDIR=${pkgdir} install
|
||||
|
||||
install -v -dm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html
|
||||
install -v -dm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html
|
||||
|
||||
cp -R --no-preserve=mode ${srcdir}/${pkgname}-${pkgver%.*}-docs-html/* ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html
|
||||
cp -R --no-preserve=mode ${srcdir}/${pkgname}-${pkgver}-docs-html/* ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html
|
||||
}
|
||||
|
@ -1,82 +0,0 @@
|
||||
diff -Nuar Python-3.12.2.orig/Lib/site.py Python-3.12.2/Lib/site.py
|
||||
--- Python-3.12.2.orig/Lib/site.py 2024-02-06 20:19:44.000000000 +0000
|
||||
+++ Python-3.12.2/Lib/site.py 2024-03-15 09:15:01.312620193 +0000
|
||||
@@ -303,9 +303,9 @@
|
||||
return f'{userbase}\\Python{ver_nodot}\\site-packages'
|
||||
|
||||
if sys.platform == 'darwin' and sys._framework:
|
||||
- return f'{userbase}/lib/python/site-packages'
|
||||
+ return f'{userbase}/lib64/python/site-packages'
|
||||
|
||||
- return f'{userbase}/lib/python{version[0]}.{version[1]}/site-packages'
|
||||
+ return f'{userbase}/lib64/python{version[0]}.{version[1]}/site-packages'
|
||||
|
||||
|
||||
def getuserbase():
|
||||
diff -Nuar Python-3.12.2.orig/Lib/sysconfig.py Python-3.12.2/Lib/sysconfig.py
|
||||
--- Python-3.12.2.orig/Lib/sysconfig.py 2024-02-06 20:19:44.000000000 +0000
|
||||
+++ Python-3.12.2/Lib/sysconfig.py 2024-03-15 09:04:41.742592638 +0000
|
||||
@@ -28,7 +28,7 @@
|
||||
'posix_prefix': {
|
||||
'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}',
|
||||
'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}',
|
||||
- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
|
||||
+ 'purelib': '{base}/lib64/python{py_version_short}/site-packages',
|
||||
'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages',
|
||||
'include':
|
||||
'{installed_base}/include/python{py_version_short}{abiflags}',
|
||||
@@ -39,9 +39,9 @@
|
||||
},
|
||||
'posix_home': {
|
||||
'stdlib': '{installed_base}/lib/python',
|
||||
- 'platstdlib': '{base}/lib/python',
|
||||
- 'purelib': '{base}/lib/python',
|
||||
- 'platlib': '{base}/lib/python',
|
||||
+ 'platstdlib': '{base}/lib64/python',
|
||||
+ 'purelib': '{base}/lib64/python',
|
||||
+ 'platlib': '{base}/lib64/python',
|
||||
'include': '{installed_base}/include/python',
|
||||
'platinclude': '{installed_base}/include/python',
|
||||
'scripts': '{base}/bin',
|
||||
@@ -77,7 +77,7 @@
|
||||
'posix_venv': {
|
||||
'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}',
|
||||
'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}',
|
||||
- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
|
||||
+ 'purelib': '{base}/lib64/python{py_version_short}/site-packages',
|
||||
'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages',
|
||||
'include':
|
||||
'{installed_base}/include/python{py_version_short}{abiflags}',
|
||||
@@ -146,17 +146,17 @@
|
||||
'posix_user': {
|
||||
'stdlib': '{userbase}/{platlibdir}/python{py_version_short}',
|
||||
'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}',
|
||||
- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
|
||||
- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
|
||||
+ 'purelib': '{userbase}/lib64/python{py_version_short}/site-packages',
|
||||
+ 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages',
|
||||
'include': '{userbase}/include/python{py_version_short}',
|
||||
'scripts': '{userbase}/bin',
|
||||
'data': '{userbase}',
|
||||
},
|
||||
'osx_framework_user': {
|
||||
- 'stdlib': '{userbase}/lib/python',
|
||||
- 'platstdlib': '{userbase}/lib/python',
|
||||
- 'purelib': '{userbase}/lib/python/site-packages',
|
||||
- 'platlib': '{userbase}/lib/python/site-packages',
|
||||
+ 'stdlib': '{userbase}/lib64/python',
|
||||
+ 'platstdlib': '{userbase}/lib64/python',
|
||||
+ 'purelib': '{userbase}/lib64/python/site-packages',
|
||||
+ 'platlib': '{userbase}/lib64/python/site-packages',
|
||||
'include': '{userbase}/include/python{py_version_short}',
|
||||
'scripts': '{userbase}/bin',
|
||||
'data': '{userbase}',
|
||||
@@ -272,7 +272,7 @@
|
||||
# On Windows we want to substitute 'lib' for schemes rather
|
||||
# than the native value (without modifying vars, in case it
|
||||
# was passed in)
|
||||
- vars = vars | {'platlibdir': 'lib'}
|
||||
+ vars = vars | {'platlibdir': 'lib64'}
|
||||
|
||||
for key, value in _INSTALL_SCHEMES[scheme].items():
|
||||
if os.name in ('posix', 'nt'):
|
159
python-3.13.0-site-packages-lib64.patch
Normal file
159
python-3.13.0-site-packages-lib64.patch
Normal file
@ -0,0 +1,159 @@
|
||||
diff -Nuar Python-3.13.0.orig/configure Python-3.13.0/configure
|
||||
--- Python-3.13.0.orig/configure 2024-10-07 13:02:14.000000000 +0800
|
||||
+++ Python-3.13.0/configure 2024-11-02 23:08:48.750226902 +0800
|
||||
@@ -9561,7 +9561,7 @@
|
||||
fi
|
||||
as_fn_append LINKFORSHARED " --preload-file=\$(WASM_ASSETS_DIR)"
|
||||
WASM_ASSETS_DIR=".\$(prefix)"
|
||||
- WASM_STDLIB="\$(WASM_ASSETS_DIR)/local/lib/python\$(VERSION)/os.py"
|
||||
+ WASM_STDLIB="\$(WASM_ASSETS_DIR)/local/lib64/python\$(VERSION)/os.py"
|
||||
WASM_LINKFORSHARED_DEBUG="-gsource-map --emit-symbol-map"
|
||||
;; #(
|
||||
node*) :
|
||||
diff -Nuar Python-3.13.0.orig/configure.ac Python-3.13.0/configure.ac
|
||||
--- Python-3.13.0.orig/configure.ac 2024-10-07 13:02:14.000000000 +0800
|
||||
+++ Python-3.13.0/configure.ac 2024-11-02 23:09:06.590226834 +0800
|
||||
@@ -2410,7 +2410,7 @@
|
||||
AS_VAR_IF([ac_sys_emscripten_target], [browser-debug], [wasm_debug=yes])
|
||||
AS_VAR_APPEND([LINKFORSHARED], [" --preload-file=\$(WASM_ASSETS_DIR)"])
|
||||
WASM_ASSETS_DIR=".\$(prefix)"
|
||||
- WASM_STDLIB="\$(WASM_ASSETS_DIR)/local/lib/python\$(VERSION)/os.py"
|
||||
+ WASM_STDLIB="\$(WASM_ASSETS_DIR)/local/lib64/python\$(VERSION)/os.py"
|
||||
dnl separate-dwarf does not seem to work in Chrome DevTools Support.
|
||||
WASM_LINKFORSHARED_DEBUG="-gsource-map --emit-symbol-map"
|
||||
],
|
||||
diff -Nuar Python-3.13.0.orig/Lib/pydoc_data/topics.py Python-3.13.0/Lib/pydoc_data/topics.py
|
||||
--- Python-3.13.0.orig/Lib/pydoc_data/topics.py 2024-10-07 13:02:14.000000000 +0800
|
||||
+++ Python-3.13.0/Lib/pydoc_data/topics.py 2024-11-02 23:09:58.916226634 +0800
|
||||
@@ -15874,7 +15874,7 @@
|
||||
'\'sys\' (built-in)>". If loaded from a file, they are '
|
||||
'written as\n'
|
||||
'"<module \'os\' from '
|
||||
- '\'/usr/local/lib/pythonX.Y/os.pyc\'>".\n',
|
||||
+ '\'/usr/local/lib64/pythonX.Y/os.pyc\'>".\n',
|
||||
'typesseq': 'Sequence Types — "list", "tuple", "range"\n'
|
||||
'*****************************************\n'
|
||||
'\n'
|
||||
diff -Nuar Python-3.13.0.orig/Lib/site.py Python-3.13.0/Lib/site.py
|
||||
--- Python-3.13.0.orig/Lib/site.py 2024-10-07 13:02:14.000000000 +0800
|
||||
+++ Python-3.13.0/Lib/site.py 2024-11-02 23:11:19.949226325 +0800
|
||||
@@ -324,9 +324,9 @@
|
||||
return f'{userbase}\\{implementation}{ver_nodot}\\site-packages'
|
||||
|
||||
if sys.platform == 'darwin' and sys._framework:
|
||||
- return f'{userbase}/lib/{implementation_lower}/site-packages'
|
||||
+ return f'{userbase}/lib64/{implementation_lower}/site-packages'
|
||||
|
||||
- return f'{userbase}/lib/python{version[0]}.{version[1]}{abi_thread}/site-packages'
|
||||
+ return f'{userbase}/lib64/python{version[0]}.{version[1]}{abi_thread}/site-packages'
|
||||
|
||||
|
||||
def getuserbase():
|
||||
diff -Nuar Python-3.13.0.orig/Lib/sysconfig/__init__.py Python-3.13.0/Lib/sysconfig/__init__.py
|
||||
--- Python-3.13.0.orig/Lib/sysconfig/__init__.py 2024-10-07 13:02:14.000000000 +0800
|
||||
+++ Python-3.13.0/Lib/sysconfig/__init__.py 2024-11-02 23:22:55.105223673 +0800
|
||||
@@ -29,7 +29,7 @@
|
||||
'posix_prefix': {
|
||||
'stdlib': '{installed_base}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}',
|
||||
'platstdlib': '{platbase}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}',
|
||||
- 'purelib': '{base}/lib/{implementation_lower}{py_version_short}{abi_thread}/site-packages',
|
||||
+ 'purelib': '{base}/lib64/{implementation_lower}{py_version_short}{abi_thread}/site-packages',
|
||||
'platlib': '{platbase}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}/site-packages',
|
||||
'include':
|
||||
'{installed_base}/include/{implementation_lower}{py_version_short}{abiflags}',
|
||||
@@ -39,10 +39,10 @@
|
||||
'data': '{base}',
|
||||
},
|
||||
'posix_home': {
|
||||
- 'stdlib': '{installed_base}/lib/{implementation_lower}',
|
||||
- 'platstdlib': '{base}/lib/{implementation_lower}',
|
||||
- 'purelib': '{base}/lib/{implementation_lower}',
|
||||
- 'platlib': '{base}/lib/{implementation_lower}',
|
||||
+ 'stdlib': '{installed_base}/lib64/{implementation_lower}',
|
||||
+ 'platstdlib': '{base}/lib64/{implementation_lower}',
|
||||
+ 'purelib': '{base}/lib64/{implementation_lower}',
|
||||
+ 'platlib': '{base}/lib64/{implementation_lower}',
|
||||
'include': '{installed_base}/include/{implementation_lower}',
|
||||
'platinclude': '{installed_base}/include/{implementation_lower}',
|
||||
'scripts': '{base}/bin',
|
||||
@@ -79,7 +79,7 @@
|
||||
'posix_venv': {
|
||||
'stdlib': '{installed_base}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}',
|
||||
'platstdlib': '{platbase}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}',
|
||||
- 'purelib': '{base}/lib/{implementation_lower}{py_version_short}{abi_thread}/site-packages',
|
||||
+ 'purelib': '{base}/lib64/{implementation_lower}{py_version_short}{abi_thread}/site-packages',
|
||||
'platlib': '{platbase}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}/site-packages',
|
||||
'include':
|
||||
'{installed_base}/include/{implementation_lower}{py_version_short}{abiflags}',
|
||||
@@ -150,17 +150,17 @@
|
||||
'posix_user': {
|
||||
'stdlib': '{userbase}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}',
|
||||
'platstdlib': '{userbase}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}',
|
||||
- 'purelib': '{userbase}/lib/{implementation_lower}{py_version_short}{abi_thread}/site-packages',
|
||||
- 'platlib': '{userbase}/lib/{implementation_lower}{py_version_short}{abi_thread}/site-packages',
|
||||
+ 'purelib': '{userbase}/lib64/{implementation_lower}{py_version_short}{abi_thread}/site-packages',
|
||||
+ 'platlib': '{userbase}/lib64/{implementation_lower}{py_version_short}{abi_thread}/site-packages',
|
||||
'include': '{userbase}/include/{implementation_lower}{py_version_short}{abi_thread}',
|
||||
'scripts': '{userbase}/bin',
|
||||
'data': '{userbase}',
|
||||
},
|
||||
'osx_framework_user': {
|
||||
- 'stdlib': '{userbase}/lib/{implementation_lower}',
|
||||
- 'platstdlib': '{userbase}/lib/{implementation_lower}',
|
||||
- 'purelib': '{userbase}/lib/{implementation_lower}/site-packages',
|
||||
- 'platlib': '{userbase}/lib/{implementation_lower}/site-packages',
|
||||
+ 'stdlib': '{userbase}/lib64/{implementation_lower}',
|
||||
+ 'platstdlib': '{userbase}/lib64/{implementation_lower}',
|
||||
+ 'purelib': '{userbase}/lib64/{implementation_lower}/site-packages',
|
||||
+ 'platlib': '{userbase}/lib64/{implementation_lower}/site-packages',
|
||||
'include': '{userbase}/include/{implementation_lower}{py_version_short}',
|
||||
'scripts': '{userbase}/bin',
|
||||
'data': '{userbase}',
|
||||
diff -Nuar Python-3.13.0.orig/Makefile.pre.in Python-3.13.0/Makefile.pre.in
|
||||
--- Python-3.13.0.orig/Makefile.pre.in 2024-10-07 13:02:14.000000000 +0800
|
||||
+++ Python-3.13.0/Makefile.pre.in 2024-11-02 23:18:05.206224779 +0800
|
||||
@@ -258,7 +258,7 @@
|
||||
|
||||
# assets for Emscripten browser builds
|
||||
WASM_ASSETS_DIR=.$(prefix)
|
||||
-WASM_STDLIB=$(WASM_ASSETS_DIR)/lib/python$(VERSION)/os.py
|
||||
+WASM_STDLIB=$(WASM_ASSETS_DIR)/lib64/python$(VERSION)/os.py
|
||||
|
||||
# Files and directories to be distributed
|
||||
CONFIGFILES= configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in
|
||||
diff -Nuar Python-3.13.0.orig/Misc/HISTORY Python-3.13.0/Misc/HISTORY
|
||||
--- Python-3.13.0.orig/Misc/HISTORY 2024-10-07 13:02:14.000000000 +0800
|
||||
+++ Python-3.13.0/Misc/HISTORY 2024-11-02 23:18:34.919224666 +0800
|
||||
@@ -30361,7 +30361,7 @@
|
||||
|
||||
- The universal makefile Misc/Makefile.pre.in now features an
|
||||
"install" target. By default, installed shared libraries go into
|
||||
-$exec_prefix/lib/python$VERSION/site-packages/.
|
||||
+$exec_prefix/lib64/python$VERSION/site-packages/.
|
||||
|
||||
- The install-sh script is installed with the other configuration
|
||||
specific files (in the config/ subdirectory).
|
||||
diff -Nuar Python-3.13.0.orig/Misc/python-config.sh.in Python-3.13.0/Misc/python-config.sh.in
|
||||
--- Python-3.13.0.orig/Misc/python-config.sh.in 2024-10-07 13:02:14.000000000 +0800
|
||||
+++ Python-3.13.0/Misc/python-config.sh.in 2024-11-02 23:19:20.514224492 +0800
|
||||
@@ -54,7 +54,7 @@
|
||||
OPT="@OPT@"
|
||||
PY_ENABLE_SHARED="@PY_ENABLE_SHARED@"
|
||||
LDVERSION="@LDVERSION@"
|
||||
-LIBDEST=${prefix_real}/lib/python${VERSION}
|
||||
+LIBDEST=${prefix_real}/lib64/python${VERSION}
|
||||
LIBPL=$(echo "@LIBPL@" | sed "s#$prefix#$prefix_real#")
|
||||
SO="@EXT_SUFFIX@"
|
||||
PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
|
||||
diff -Nuar Python-3.13.0.orig/Python/initconfig.c Python-3.13.0/Python/initconfig.c
|
||||
--- Python-3.13.0.orig/Python/initconfig.c 2024-10-07 13:02:14.000000000 +0800
|
||||
+++ Python-3.13.0/Python/initconfig.c 2024-11-02 23:19:56.102224356 +0800
|
||||
@@ -303,7 +303,7 @@
|
||||
#if defined(MS_WINDOWS)
|
||||
# define PYTHONHOMEHELP "<prefix>\\python{major}{minor}"
|
||||
#else
|
||||
-# define PYTHONHOMEHELP "<prefix>/lib/pythonX.X"
|
||||
+# define PYTHONHOMEHELP "<prefix>/lib64/pythonX.X"
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user