2024-11-03 19:29:19 +01:00

50 lines
1.8 KiB
Bash

# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.pro>
_realname=pyinstaller
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=6.11.0
pkgrel=2
pkgdesc='Bundles a Python application and all its dependencies into a single package (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64')
url='https://pyinstaller.org/'
msys2_repository_url='https://github.com/pyinstaller/pyinstaller'
license=('custom')
depends=("${MINGW_PACKAGE_PREFIX}-binutils"
"${MINGW_PACKAGE_PREFIX}-pyinstaller-hooks-contrib"
"${MINGW_PACKAGE_PREFIX}-python-altgraph"
"${MINGW_PACKAGE_PREFIX}-python-packaging"
"${MINGW_PACKAGE_PREFIX}-python-pefile"
"${MINGW_PACKAGE_PREFIX}-python-pywin32-ctypes"
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-wheel")
options=('!strip')
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('cb4d433a3db30d9d17cf5f2cf7bb4df80a788d493c1d67dd822dc5791d9864af')
prepare() {
cd "${_realname}-${pkgver}"/PyInstaller/bootloader
# Remove unused bootloaders
for bl in $(ls | grep -v Windows-64bit | grep -v images); do rm -rf $bl; done
}
build() {
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd "python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=" \
python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 COPYING.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING.txt"
}