diff options
author | Atte Lautanala | 2018-05-17 15:57:01 +0300 |
---|---|---|
committer | Atte Lautanala | 2018-05-17 15:57:01 +0300 |
commit | f69496f9c60c9d3cbc17469fe5930852a4184459 (patch) | |
tree | 8671a521de4c345dfc4f090e072a825df042bbf0 | |
download | aur-f69496f9c60c9d3cbc17469fe5930852a4184459.tar.gz |
Build Python 3.7
-rw-r--r-- | .SRCINFO | 35 | ||||
-rw-r--r-- | PKGBUILD | 76 | ||||
-rw-r--r-- | dont-make-libpython-readonly.patch | 10 |
3 files changed, 121 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9d2ad05acdd5 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,35 @@ +pkgbase = python37 + pkgdesc = Next generation of the python high-level scripting language + pkgver = 3.7.0b4 + pkgrel = 1 + url = https://www.python.org/ + arch = i686 + arch = x86_64 + license = custom + makedepends = tk + makedepends = sqlite + makedepends = valgrind + makedepends = bluez-libs + makedepends = mpdecimal + makedepends = llvm + makedepends = gdb + makedepends = xorg-server-xvfb + depends = expat + depends = bzip2 + depends = gdbm + depends = openssl + depends = libffi + depends = zlib + depends = libnsl + optdepends = tk: for tkinter + optdepends = sqlite + optdepends = mpdecimal: for decimal + optdepends = xz: for lzma + options = !makeflags + source = https://www.python.org/ftp/python/3.7.0/Python-3.7.0b4.tar.xz + source = dont-make-libpython-readonly.patch + sha512sums = e97459a5467a984a5a2bfc08ed937dfeb899f3d4ff9a655878badffc19e722efc30112422c14f94fcf9f6c82ee01e9fe2bb538db83454e4c83b711d1a8444472 + sha512sums = 500ea7f603f96f721d04ca64390f4bd9ddbab2c16b837b67f8a51ed9167a1d57c5b435be1ebe98b0c74eff728714033b3dcbb5ee978b9bf98086571399717f17 + +pkgname = python37 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e5659efc49d0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,76 @@ +pkgname=python37 +pkgver=3.7.0b4 +pkgrel=1 +_pybasever=3.7 +pkgdesc="Next generation of the python high-level scripting language" +arch=('i686' 'x86_64') +license=('custom') +url="https://www.python.org/" +depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib' 'libnsl') +makedepends=('tk' 'sqlite' 'valgrind' 'bluez-libs' 'mpdecimal' 'llvm' 'gdb' 'xorg-server-xvfb') +optdepends=('tk: for tkinter' 'sqlite' 'mpdecimal: for decimal' 'xz: for lzma') +options=('!makeflags') +source=("https://www.python.org/ftp/python/${pkgver%b*}/Python-${pkgver}.tar.xz" + dont-make-libpython-readonly.patch) +sha512sums=('e97459a5467a984a5a2bfc08ed937dfeb899f3d4ff9a655878badffc19e722efc30112422c14f94fcf9f6c82ee01e9fe2bb538db83454e4c83b711d1a8444472' + '500ea7f603f96f721d04ca64390f4bd9ddbab2c16b837b67f8a51ed9167a1d57c5b435be1ebe98b0c74eff728714033b3dcbb5ee978b9bf98086571399717f17') + +prepare() { + cd "${srcdir}/Python-${pkgver}" + + # FS#45809 + patch -p1 -i ../dont-make-libpython-readonly.patch + + # FS#23997 + sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py + + rm -r Modules/expat + rm -r Modules/_ctypes/{darwin,libffi}* + rm -r Modules/_decimal/libmpdec +} + +build() { + cd "${srcdir}/Python-${pkgver}" + + ./configure --prefix=/usr \ + --enable-shared \ + --with-threads \ + --with-computed-gotos \ + --enable-optimizations \ + --with-lto \ + --enable-ipv6 \ + --with-valgrind \ + --with-system-expat \ + --with-dbmliborder=gdbm:ndbm \ + --with-system-ffi \ + --with-system-libmpdec \ + --enable-loadable-sqlite-extensions + + LC_CTYPE=en_US.UTF-8 xvfb-run make EXTRA_CFLAGS="$CFLAGS" +} + +check() { + cd "${srcdir}/Python-${pkgver}" + + LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} \ + LC_CTYPE=en_US.UTF-8 xvfb-run \ + "${srcdir}/Python-${pkgver}/python" -m test.regrtest -v -uall -x test_gdb +} + +package() { + cd "${srcdir}/Python-${pkgver}" + + make DESTDIR="${pkgdir}" EXTRA_CFLAGS="$CFLAGS" altinstall maninstall + + # Remove files that conflict with python package + rm "${pkgdir}/usr/lib/libpython3.so" + rm "${pkgdir}/usr/share/man/man1/python3.1" + + # 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" +} diff --git a/dont-make-libpython-readonly.patch b/dont-make-libpython-readonly.patch new file mode 100644 index 000000000000..ae1ec33375b7 --- /dev/null +++ b/dont-make-libpython-readonly.patch @@ -0,0 +1,10 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -70,7 +70,7 @@ + # Shared libraries must be installed with executable mode on some systems; + # rather than figuring out exactly which, we always give them executable mode. + # Also, making them read-only seems to be a good idea... +-INSTALL_SHARED= ${INSTALL} -m 555 ++INSTALL_SHARED= ${INSTALL} -m 755 + + MKDIR_P= @MKDIR_P@ |