diff options
author | Michel Zou | 2019-10-15 17:55:01 +0200 |
---|---|---|
committer | Michel Zou | 2019-10-15 17:55:01 +0200 |
commit | ec4b788b283f7be7afe04aa288cb88b9a6545f3e (patch) | |
tree | a2c38f51d8815b4d1c43150bba6f78a4f63501c7 | |
download | aur-ec4b788b283f7be7afe04aa288cb88b9a6545f3e.tar.gz |
3.8.0
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 66 | ||||
-rw-r--r-- | wine-python.sh | 14 |
3 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e0f722dcfdb8 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = mingw-w64-python38-bin + pkgdesc = Next generation of the python high-level scripting language (native MSVC version) (mingw-w64) + pkgver = 3.8.0 + pkgrel = 1 + url = http://www.python.org/ + arch = any + license = PSF + makedepends = mingw-w64-tools + makedepends = mingw-w64-binutils + depends = mingw-w64-openssl + optdepends = mingw-w64-wine: runtime support + noextract = python-3.8.0-embed-win32.zip + noextract = python-3.8.0-embed-amd64.zip + options = staticlibs + options = !buildflags + options = !strip + source = https://www.python.org/ftp/python/3.8.0/python-3.8.0-embed-win32.zip + source = https://www.python.org/ftp/python/3.8.0/python-3.8.0-embed-amd64.zip + source = https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz + source = wine-python.sh + sha256sums = 233036f6f97c33af94b6af3d4fed1cb61b7538074e59116c15e4e64238419d84 + sha256sums = 9f4dba6c7b5c5db2993d899b4627872932e2229fdb9353ed352278cd4ea8b174 + sha256sums = f1069ad3cae8e7ec467aa98a6565a62a48ef196cb8f1455a245a08db5e1792df + sha256sums = SKIP + +pkgname = mingw-w64-python38-bin + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ea675d49b2c3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,66 @@ +pkgname=mingw-w64-python38-bin +pkgver=3.8.0 +_pybasever=38 +pkgrel=1 +pkgdesc="Next generation of the python high-level scripting language (native MSVC version) (mingw-w64)" +arch=('any') +license=('PSF') +url="http://www.python.org/" +depends=('mingw-w64-openssl') +optdepends=('mingw-w64-wine: runtime support') +makedepends=('mingw-w64-tools' 'mingw-w64-binutils') +options=('staticlibs' '!buildflags' '!strip') +source=("https://www.python.org/ftp/python/${pkgver}/python-${pkgver}-embed-win32.zip" + "https://www.python.org/ftp/python/${pkgver}/python-${pkgver}-embed-amd64.zip" + "https://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tgz" + wine-python.sh) +noextract=("python-${pkgver}-embed-win32.zip" + "python-${pkgver}-embed-amd64.zip") +sha256sums=('233036f6f97c33af94b6af3d4fed1cb61b7538074e59116c15e4e64238419d84' + '9f4dba6c7b5c5db2993d899b4627872932e2229fdb9353ed352278cd4ea8b174' + 'f1069ad3cae8e7ec467aa98a6565a62a48ef196cb8f1455a245a08db5e1792df' + 'SKIP') + +_architectures="i686-w64-mingw32 x86_64-w64-mingw32" + +prepare () { + cd "${srcdir}/Python-${pkgver}" +} + +build() { + cd "${srcdir}/Python-${pkgver}" + for _arch in ${_architectures}; do + target="win32" + if test "${_arch}" = x86_64-w64-mingw32 + then + target="amd64" + fi + mkdir -p "build-${_arch}" && pushd "build-${_arch}" + bsdtar -xf "${srcdir}"/python-${pkgver}b4-embed-${target}.zip + gendef python${_pybasever}.dll + ${_arch}-dlltool --dllname python${_pybasever}.dll --def python${_pybasever}.def --output-lib libpython${_pybasever}.dll.a + sed "s|@TRIPLE@|${_arch}|g;s|@PYVER@|${_pybasever}|g" "${srcdir}"/wine-python.sh > ${_arch}-python${_pybasever}-bin + popd + done +} + +package() { + for _arch in ${_architectures}; do + cd "${srcdir}/Python-${pkgver}/build-${_arch}" + install -d "$pkgdir"/usr/${_arch}/lib + install -m644 libpython${_pybasever}*.a "$pkgdir"/usr/${_arch}/lib + install -d "$pkgdir"/usr/${_arch}/bin + install -d "$pkgdir"/usr/${_arch}/include/python${_pybasever} + install -m644 ../Include/*.h "$pkgdir"/usr/${_arch}/include/python${_pybasever} + install -m644 ../PC/pyconfig.h "$pkgdir"/usr/${_arch}/include/python${_pybasever} + install -m755 python${_pybasever}.dll "$pkgdir"/usr/${_arch}/bin + install -d "$pkgdir"/usr/${_arch}/lib/python${_pybasever} + install -m644 *.pyd "$pkgdir"/usr/${_arch}/lib/python${_pybasever} + install -m755 python.exe "$pkgdir"/usr/${_arch}/bin/python${_pybasever}.exe + install -m644 python${_pybasever}.zip "$pkgdir"/usr/${_arch}/bin/ + install -d "$pkgdir"/usr/bin + install -m755 ${_arch}-python${_pybasever}-bin "$pkgdir"/usr/bin + pushd "$pkgdir"/usr/${_arch}/bin/ + ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll + done +} diff --git a/wine-python.sh b/wine-python.sh new file mode 100644 index 000000000000..83601211eb50 --- /dev/null +++ b/wine-python.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +export PYTHONHOME=/usr/@TRIPLE@ + +if test -z "${PYTHONPATH}" +then + export PYTHONPATH=/usr/@TRIPLE@/lib/python@PYVER@ +else + export PYTHONPATH="${PYTHONPATH};/usr/@TRIPLE@/lib/python@PYVER@" +fi + +@TRIPLE@-wine /usr/@TRIPLE@/bin/python@PYVER@.exe "$@" |