Files
MINGW-packages/mingw-w64-python-libsass/PKGBUILD
Christoph Reiter 09fc5ff426 Python rebuilds
2023-07-24 18:19:03 +02:00

50 lines
1.7 KiB
Bash

# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.pro>
_realname=libsass
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=0.22.0
pkgrel=2
pkgdesc='Sass for Python: A straightforward binding of libsass for Python (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://github.com/sass/libsass-python'
license=('MIT')
depends=("${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-libsass")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-wheel")
options=('!strip')
source=("${_realname}-python-$pkgver.tar.gz::${url}/archive/${pkgver}.tar.gz"
'0001-libsass-python-0.22.0-setup-msystem.patch')
sha256sums=('f26d466918496fbce0890a3c388c78ee25ef9165a7affc591f846d0f8f1a671e'
'1d80f8ff2eda63958e2bb39028d98f8cdacb503882ae7d03c4a7a6b5cdbab9a9')
prepare() {
cp -r "${_realname}-python-${pkgver}" "python-build-${MSYSTEM}"
cd "python-build-${MSYSTEM}"
patch -p1 -i "${srcdir}/0001-libsass-python-0.22.0-setup-msystem.patch"
}
build() {
msg "Python build for ${MSYSTEM}"
cd "${srcdir}/python-build-${MSYSTEM}"
export SYSTEM_SASS="1"
${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
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}