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

40 lines
1.3 KiB
Bash

# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
_realname=flit
pkgbase=mingw-w64-python-${_realname}-core
pkgname=(${MINGW_PACKAGE_PREFIX}-python-$_realname-core)
pkgver=3.9.0
pkgrel=2
pkgdesc='Simplified packaging of Python modules (core backend) (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://github.com/takluyver/flit'
license=('spdx:BSD-3-Clause')
depends=("${MINGW_PACKAGE_PREFIX}-python")
source=("${_realname}-$pkgver.tar.gz"::"$url/archive/$pkgver.tar.gz")
sha256sums=('55e28d0953726c4c744f02779b85f733f65da5bffb6a5d2fe11072d19ca2d148')
prepare() {
cd "${_realname}-${pkgver}"
}
build() {
cd "${_realname}-${pkgver}/flit_core"
PYTHONPATH=flit_core python -m flit_core.wheel
}
package() {
cd "${_realname}-${pkgver}/flit_core"
_pythonpath=`python -c "import sysconfig; print(sysconfig.get_path('platlib'))"`
_site_packages="${pkgdir}$(cygpath ${_pythonpath})"
mkdir -p "$_site_packages"
python bootstrap_install.py -i"${_site_packages}" dist/flit_core-*.whl
MSYS2_ARG_CONV_EXCL="-p" python -m compileall \
-o 0 -o 1 -q -s"${pkgdir}" -p"/" "${pkgdir}${MINGW_PREFIX}/lib/python"*
install -Dm 644 ../LICENSE "$pkgdir${MINGW_PREFIX}"/share/licenses/${_realname}-core/LICENSE
}