summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD12
-rw-r--r--wine-python.sh8
3 files changed, 21 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f45c56e9d0cd..a7693226132a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
-# Generated by mksrcinfo v8
-# Fri Jun 29 15:45:31 UTC 2018
pkgbase = mingw-w64-python36-bin
pkgdesc = Next generation of the python high-level scripting language (native MSVC version) (mingw-w64)
pkgver = 3.6.5
- pkgrel = 1
+ pkgrel = 2
url = http://www.python.org/
arch = any
license = PSF
makedepends = mingw-w64-tools
makedepends = mingw-w64-binutils
depends = mingw-w64-crt
+ optdepends = mingw-w64-wine: runtime support
noextract = python-3.6.5-embed-win32.zip
noextract = python-3.6.5-embed-amd64.zip
options = staticlibs
@@ -18,9 +17,11 @@ pkgbase = mingw-w64-python36-bin
source = https://www.python.org/ftp/python/3.6.5/python-3.6.5-embed-win32.zip
source = https://www.python.org/ftp/python/3.6.5/python-3.6.5-embed-amd64.zip
source = https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
+ source = wine-python.sh
sha256sums = f654c055817b5a2c5b050d744833d95d621aeaa507b5c28b4840712821a70891
sha256sums = dfb476fabd20f617c8a5be58ca3e55844c8310710c6ff0dd25486d1d03c95a28
sha256sums = 53a3e17d77cd15c5230192b6a8c1e031c07cd9f34a2f089a731c6f6bd343d5c6
+ sha256sums = SKIP
pkgname = mingw-w64-python36-bin
diff --git a/PKGBUILD b/PKGBUILD
index ba5654aaa83e..75778cefab63 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,22 +1,25 @@
pkgname=mingw-w64-python36-bin
pkgver=3.6.5
_pybasever=36
-pkgrel=1
+pkgrel=2
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-crt')
+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")
+ "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=('f654c055817b5a2c5b050d744833d95d621aeaa507b5c28b4840712821a70891'
'dfb476fabd20f617c8a5be58ca3e55844c8310710c6ff0dd25486d1d03c95a28'
- '53a3e17d77cd15c5230192b6a8c1e031c07cd9f34a2f089a731c6f6bd343d5c6')
+ '53a3e17d77cd15c5230192b6a8c1e031c07cd9f34a2f089a731c6f6bd343d5c6'
+ SKIP)
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
@@ -32,6 +35,7 @@ build() {
bsdtar -xf "${srcdir}"/python-${pkgver}-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
}
@@ -51,5 +55,7 @@ package() {
install -m755 python.exe "$pkgdir"/usr/${_arch}/bin/python${_pybasever}.exe
install -m644 python${_pybasever}.zip "$pkgdir"/usr/${_arch}/bin/
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ install -d "$pkgdir"/usr/bin
+ install -m755 ${_arch}-python${_pybasever}-bin "$pkgdir"/usr/bin
done
}
diff --git a/wine-python.sh b/wine-python.sh
new file mode 100644
index 000000000000..19bb168e7b95
--- /dev/null
+++ b/wine-python.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+export PYTHONHOME=/usr/@TRIPLE@
+export PYTHONPATH=/usr/@TRIPLE@/lib/python@PYVER@
+
+@TRIPLE@-wine /usr/@TRIPLE@/bin/python@PYVER@.exe "$@"