python 3.12.2-1
This commit is contained in:
commit
615a292fd1
59
PKGBUILD
Normal file
59
PKGBUILD
Normal file
@ -0,0 +1,59 @@
|
||||
# This is an example PKGBUILD file. Use this as a start to creating your own,
|
||||
# and remove these comments. For more information, see 'man PKGBUILD'.
|
||||
# NOTE: Please fill out the license field for your package! If it is unknown,
|
||||
# then please put 'unknown'.
|
||||
|
||||
# Maintainer: Future Linux Team <future_linux@163.com>
|
||||
pkgname=python
|
||||
pkgver=3.12.2
|
||||
pkgrel=1
|
||||
pkgdesc="The Python programming language"
|
||||
arch=('x86_64')
|
||||
url="https://www.python.org/"
|
||||
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}-${pkgver}-site-packages-lib64.patch)
|
||||
sha256sums=(be28112dac813d2053545c14bf13a16401a21877f1a69eb6ea5d84c4a0f3d870
|
||||
97813b3a32e8b573ada8e3a1153e2fd7c0b31167662bf501ee495a37615c511b
|
||||
83f0e0d43173057e1b29d503ab0479d24ada51aadf8b62e2d484b95d211478f5)
|
||||
|
||||
prepare() {
|
||||
cd Python-${pkgver}
|
||||
|
||||
patch -Np1 -i ${srcdir}/${pkgname}-${pkgver}-site-packages-lib64.patch
|
||||
|
||||
}
|
||||
|
||||
build() {
|
||||
cd Python-${pkgver}
|
||||
|
||||
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
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd Python-${pkgver}
|
||||
|
||||
make DESTDIR=${pkgdir} install
|
||||
|
||||
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
|
||||
}
|
82
python-3.12.2-site-packages-lib64.patch
Normal file
82
python-3.12.2-site-packages-lib64.patch
Normal file
@ -0,0 +1,82 @@
|
||||
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'):
|
Loading…
Reference in New Issue
Block a user