cython - 0.27.3 - Update to latest version and fix .exe installation so that the correct interpretter is run. (#3399)

This commit is contained in:
J. Peter Mugaas
2018-02-16 05:51:09 -05:00
committed by Алексей
parent 662f10c982
commit db612da4a0
5 changed files with 67 additions and 6 deletions

View File

@@ -4,7 +4,7 @@
_realname=cython
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-cython" "${MINGW_PACKAGE_PREFIX}-cython2")
pkgver=0.27
pkgver=0.27.3
pkgrel=1
pkgdesc="C-Extensions for Python (mingw-w64)"
arch=('any')
@@ -15,10 +15,9 @@ makedepends=(
"${MINGW_PACKAGE_PREFIX}-python2-setuptools"
"${MINGW_PACKAGE_PREFIX}-gcc"
)
_dtoken="94/63/f54920c2ddbe3e1341a4c268f7091bf1bf53c3d84f4b115aa5beea64aef9"
_dtoken='ee/2a/c4d2cdd19c84c32d978d18e9355d1ba9982a383de87d0fcb5928553d37f4'
source=("https://pypi.python.org/packages/${_dtoken}/Cython-${pkgver}.tar.gz")
sha256sums=('b932b5194e87a8b853d493dc1b46e38632d6846a86f55b8346eb9c6ec3bdc00b')
sha256sums=('6a00512de1f2e3ce66ba35c5420babaef1fe2d9c43a8faab4080b0dbcc26bc64')
prepare() {
cd "${srcdir}"
@@ -39,7 +38,8 @@ package_cython() {
# Our setuptools {gui,cli}{,-32,-64}.exe have special-case handling for /usr/bin/env such that
# they look in PATH.
sed -i 's|#!.*|#!/usr/bin/env python3|' ${pkgdir}/${MINGW_PREFIX}/bin/cy{gdb,thon}-script.py
# sed -i 's|#!.*|#!/usr/bin/env python3|' ${pkgdir}/${MINGW_PREFIX}/bin/cy{gdb,thon}-script.py
sed -i "s|#!.*|#!${MINGW_PREFIX}/bin/python3|" ${pkgdir}/${MINGW_PREFIX}/bin/cy{gdb,thon}-script.py
}
package_cython2() {
@@ -52,7 +52,8 @@ package_cython2() {
# Our setuptools {gui,cli}{,-32,-64}.exe have special-case handling for /usr/bin/env such that
# they look in PATH.
sed -i 's|#!.*|#!/usr/bin/env python2|' ${pkgdir}/${MINGW_PREFIX}/bin/cy{gdb,thon}-script.py
# sed -i 's|#!.*|#!/usr/bin/env python2|' ${pkgdir}/${MINGW_PREFIX}/bin/cy{gdb,thon}-script.py
sed -i "s|#!.*|#!${MINGW_PREFIX}/bin/python2|" ${pkgdir}/${MINGW_PREFIX}/bin/cy{gdb,thon}-script.py
mv ${pkgdir}${MINGW_PREFIX}/bin/cygdb{,2}.exe
mv ${pkgdir}${MINGW_PREFIX}/bin/cython{,2}.exe
@@ -69,17 +70,21 @@ package_cython2() {
}
package_mingw-w64-i686-cython() {
install=${_realname}2-${CARCH}.install
package_cython
}
package_mingw-w64-i686-cython2() {
install=${_realname}2-${CARCH}.install
package_cython2
}
package_mingw-w64-x86_64-cython() {
install=${_realname}2-${CARCH}.install
package_cython
}
package_mingw-w64-x86_64-cython2() {
install=${_realname}2-${CARCH}.install
package_cython2
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw32
local _prefix=$(pwd -W)
cd -
local _it
for _it in cython cythonize cygdb; do
sed -e "s|/mingw32|${_prefix}|g" \
-i mingw32/bin/${_it}-script.py
done
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw64
local _prefix=$(pwd -W)
cd -
local _it
for _it in cython cythonize cygdb; do
sed -e "s|/mingw64|${_prefix}|g" \
-i mingw64/bin/${_it}-script.py
done
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw32
local _prefix=$(pwd -W)
cd -
local _it
for _it in cython2 cythonize2 cygdb2; do
sed -e "s|/mingw32|${_prefix}|g" \
-i mingw32/bin/${_it}-script.py
done
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw64
local _prefix=$(pwd -W)
cd -
local _it
for _it in cython2 cythonize2 cygdb2; do
sed -e "s|/mingw64|${_prefix}|g" \
-i mingw64/bin/${_it}-script.py
done
}
post_upgrade() {
post_install
}