50 lines
1.6 KiB
Bash
50 lines
1.6 KiB
Bash
# Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com >
|
|
# Contributor: Ray Donnelly <mingw.android@gmail.com>
|
|
|
|
_pyname=Cython
|
|
_realname=cython
|
|
pkgbase=mingw-w64-${_realname}0
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-cython0")
|
|
pkgver=0.29.37
|
|
pkgrel=2
|
|
pkgdesc="C-Extensions for Python (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url="https://cython.org/"
|
|
msys2_repository_url="https://github.com/cython/cython"
|
|
msys2_references=(
|
|
"pypi: Cython"
|
|
)
|
|
license=('spdx:Apache-2.0')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-wheel"
|
|
"${MINGW_PACKAGE_PREFIX}-cc")
|
|
conflicts=("${MINGW_PACKAGE_PREFIX}-cython")
|
|
options=(!strip)
|
|
source=("https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
|
|
sha256sums=('f813d4a6dd94adee5d4ff266191d1d95bf6d4164a4facc535422c021b2504cfb')
|
|
|
|
prepare() {
|
|
rm -rf python-build-${MSYSTEM}| true
|
|
cp -r "${_pyname}-${pkgver}" "python-build-${MSYSTEM}"
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
|
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
|
|
--destdir="${pkgdir}" dist/*.whl
|
|
|
|
# Remove a warning about srcdir
|
|
_src="$(cygpath -m $srcdir)"
|
|
find ${pkgdir}/ -name "*.txt" -exec sed -e "s|$_src\/||g" -e "s|python-build-${MSYSTEM}\/||g" -i {} \;
|
|
}
|