summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsausix2021-02-22 14:10:53 +0100
committersausix2021-02-22 14:10:53 +0100
commit6a373f5a660cc1c318e1636b1d5d537266b65912 (patch)
tree9483390b14cd84d9d699c7b7c1a8a4712e600751
downloadaur-6a373f5a660cc1c318e1636b1d5d537266b65912.tar.gz
initial commit
Signed-off-by: sausix <aur@sausenthaler.de>
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD76
2 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1a614b8d277e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = python310-patma-branch
+ pkgdesc = Python 3.10 branch with pattern matching feature (PEP 634)
+ pkgver = 3.10.0a5
+ pkgrel = 1
+ url = https://www.python.org/
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = tk
+ makedepends = sqlite
+ makedepends = bluez-libs
+ makedepends = mpdecimal
+ depends = expat
+ depends = bzip2
+ depends = gdbm
+ depends = openssl
+ depends = libffi
+ depends = zlib
+ optdepends = tk: for tkinter
+ optdepends = sqlite
+ conflicts = python310
+ options = !makeflags
+ source = git://github.com/brandtbucher/cpython.git#branch=patma
+ sha256sums = SKIP
+
+pkgname = python310-patma-branch
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..08a31fac9826
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,76 @@
+# Maintainer: Adrian Sausenthaler <aur@sausenthaler.de>
+# Forked from AUR/python310 (Tobias Kunze <r@rixx.de>)
+pkgname=python310-patma-branch
+pkgver=3.10.0a5
+pkgrel=1
+_pybasever=3.10
+_pymajver=3
+pkgdesc="Python 3.10 branch with pattern matching feature (PEP 634)"
+arch=('i686' 'x86_64')
+license=('custom')
+url="https://www.python.org/"
+conflicts=("python310")
+depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib')
+makedepends=('tk' 'sqlite' 'bluez-libs' 'mpdecimal')
+optdepends=('tk: for tkinter' 'sqlite')
+options=('!makeflags')
+source=(git://github.com/brandtbucher/cpython.git#branch=patma)
+sha256sums=('SKIP')
+
+prepare() {
+ cd "${srcdir}/cpython"
+
+ # 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, zlib and libffi),
+ # rather than copies shipped in the tarball
+ rm -rf Modules/expat
+ rm -rf Modules/_ctypes/{darwin,libffi}*
+ rm -rf Modules/_decimal/libmpdec
+}
+
+build() {
+ cd "${srcdir}/cpython"
+
+ CFLAGS=-DOPENSSL_NO_SSL2 ./configure --prefix=/usr \
+ --enable-shared \
+ --with-threads \
+ --with-computed-gotos \
+ --enable-ipv6 \
+ --with-system-expat \
+ --with-dbmliborder=gdbm:ndbm \
+ --with-system-libmpdec \
+ --enable-loadable-sqlite-extensions \
+ --without-ensurepip
+
+ make
+}
+
+package() {
+ cd "${srcdir}/cpython"
+ # altinstall: /usr/bin/pythonX.Y but not /usr/bin/python or /usr/bin/pythonX
+ make DESTDIR="${pkgdir}" altinstall maninstall
+
+ # 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"
+
+ # Fix FS#22552
+ ln -sf ../../libpython${_pybasever}m.so \
+ "${pkgdir}/usr/lib/python${_pybasever}/config-${_pybasever}-${CARCH}-linux-gnu/libpython${_pybasever}m.so"
+
+ # Fix pycairo build
+ ln -sf python${_pybasever}m-config "${pkgdir}/usr/bin/python${_pybasever}-config"
+
+ # Clean-up reference to build directory
+ sed -i "s|$srcdir/Python-${pkgver}:||" "$pkgdir/usr/lib/python${_pybasever}/config-${_pybasever}-${CARCH}-linux-gnu/Makefile"
+
+ # Add useful scripts 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/${pkgname}/LICENSE"
+}