summaryrefslogtreecommitdiffstats
path: root/python310-kj_sh604
diff options
context:
space:
mode:
Diffstat (limited to 'python310-kj_sh604')
-rw-r--r--python310-kj_sh604/.SRCINFO33
-rw-r--r--python310-kj_sh604/.gitignore4
-rw-r--r--python310-kj_sh604/PKGBUILD92
3 files changed, 129 insertions, 0 deletions
diff --git a/python310-kj_sh604/.SRCINFO b/python310-kj_sh604/.SRCINFO
new file mode 100644
index 0000000..db3330e
--- /dev/null
+++ b/python310-kj_sh604/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = python310-kj_sh604
+ pkgdesc = Next generation of the python high-level scripting language, version 3.10
+ pkgver = 3.10.16
+ pkgrel = 1
+ url = https://www.python.org/
+ arch = x86_64
+ license = custom
+ makedepends = tk
+ makedepends = sqlite
+ makedepends = bluez-libs
+ makedepends = mpdecimal
+ makedepends = llvm
+ makedepends = gdb
+ depends = bzip2
+ depends = expat
+ depends = gdbm
+ depends = libffi
+ depends = libnsl
+ depends = libxcrypt
+ depends = openssl
+ depends = zlib
+ optdepends = python-setuptools
+ optdepends = python-pip
+ optdepends = sqlite
+ optdepends = mpdecimal: for decimal
+ optdepends = xz: for lzma
+ optdepends = tk: for tkinter
+ provides = python=3.10.16
+ source = https://www.python.org/ftp/python/3.10.16/Python-3.10.16.tar.xz
+ validpgpkeys = A035C8C19219BA821ECEA86B64E628F8D684696D
+ sha256sums = bfb249609990220491a1b92850a07135ed0831e41738cf681d63cf01b2a8fbd1
+
+pkgname = python310-kj_sh604
diff --git a/python310-kj_sh604/.gitignore b/python310-kj_sh604/.gitignore
new file mode 100644
index 0000000..5bb5a3d
--- /dev/null
+++ b/python310-kj_sh604/.gitignore
@@ -0,0 +1,4 @@
+pkg
+src
+.idea
+*.tar*
diff --git a/python310-kj_sh604/PKGBUILD b/python310-kj_sh604/PKGBUILD
new file mode 100644
index 0000000..6a0aeca
--- /dev/null
+++ b/python310-kj_sh604/PKGBUILD
@@ -0,0 +1,92 @@
+pkgname=python310-kj_sh604
+pkgver=3.10.16
+pkgrel=1
+_pymajver=3
+_pybasever=${pkgver%.*}
+licdir="${pkgname}-kj_sh604"
+pkgdesc="Next generation of the python high-level scripting language, version 3.10"
+arch=('x86_64')
+license=('custom')
+url="https://www.python.org/"
+depends=('bzip2' 'expat' 'gdbm' 'libffi' 'libnsl' 'libxcrypt' 'openssl' 'zlib')
+makedepends=('tk' 'sqlite' 'bluez-libs' 'mpdecimal' 'llvm' 'gdb')
+optdepends=('python-setuptools'
+ 'python-pip'
+ 'sqlite'
+ 'mpdecimal: for decimal'
+ 'xz: for lzma'
+ 'tk: for tkinter')
+source=("https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz")
+sha256sums=('bfb249609990220491a1b92850a07135ed0831e41738cf681d63cf01b2a8fbd1')
+validpgpkeys=('A035C8C19219BA821ECEA86B64E628F8D684696D') # Pablo Galindo Salgado <pablogsal@gmail.com>
+provides=("python=$pkgver")
+
+prepare() {
+ cd Python-${pkgver}
+
+ # FS#23997
+ sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
+
+ # Ensure that we are using the system copy of various libraries (expat, libffi, and libmpdec),
+ # rather than copies shipped in the tarball
+ rm -r Modules/expat
+ rm -r Modules/_ctypes/{darwin,libffi}*
+ rm -r Modules/_decimal/libmpdec
+}
+
+build() {
+ cd Python-${pkgver}
+
+ # PGO should be done with -O3
+ CFLAGS="${CFLAGS/-O2/-O3} -ffat-lto-objects"
+
+ # Disable bundled pip & setuptools
+ ./configure \
+ ax_cv_c_float_words_bigendian=no \
+ --prefix=/usr \
+ --enable-shared \
+ --with-computed-gotos \
+ --enable-optimizations \
+ --with-lto \
+ --enable-ipv6 \
+ --with-system-expat \
+ --with-dbmliborder=gdbm:ndbm \
+ --with-system-ffi \
+ --with-system-libmpdec \
+ --enable-loadable-sqlite-extensions \
+ --without-ensurepip \
+ --with-tzpath=/usr/share/zoneinfo
+
+ make EXTRA_CFLAGS="$CFLAGS"
+}
+
+
+package() {
+ cd Python-${pkgver}
+
+ # Hack to avoid building again
+ sed -i 's/^all:.*$/all: build_all/' Makefile
+
+ # PGO should be done with -O3
+ CFLAGS="${CFLAGS/-O2/-O3}"
+
+ make DESTDIR="${pkgdir}" EXTRA_CFLAGS="$CFLAGS" altinstall maninstall
+
+ # Split tests
+ rm -r "$pkgdir"/usr/lib/python*/{test,ctypes/test,distutils/tests,idlelib/idle_test,lib2to3/tests,sqlite3/test,tkinter/test,unittest/test}
+
+ # Avoid conflicts with the main 'python' package.
+ rm -f "${pkgdir}/usr/lib/libpython${_pymajver}.so"
+ rm -f "${pkgdir}/usr/share/man/man1/python${_pymajver}.1"
+
+ # Clean-up reference to build directory
+ sed -i "s|$srcdir/Python-${pkgver}:||" "$pkgdir/usr/lib/python${_pybasever}/config-${_pybasever}-${CARCH}-linux-gnu/Makefile"
+
+ # some useful "stuff" FS#46146
+ install -dm755 "${pkgdir}"/usr/lib/python${_pybasever}/Tools/{i18n,scripts}
+ install -m755 Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}"/usr/lib/python${_pybasever}/Tools/i18n/
+ install -m755 Tools/scripts/{README,*py} "${pkgdir}"/usr/lib/python${_pybasever}/Tools/scripts/
+
+ # License
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${licdir}/LICENSE"
+}