77 lines
2.5 KiB
Bash
77 lines
2.5 KiB
Bash
# Maintainer: Marcelo Duarte https://github.com/marcelotduarte
|
|
# Maintainer: Frode Solheim <frode@fs-uae.net>
|
|
# Contributor: Duong Pham <dthpham@gmail.com>
|
|
# Contributor: Lara Maia <dev@lara.click>
|
|
|
|
_realname=cx-freeze
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=8.4.1
|
|
pkgrel=1
|
|
pkgdesc="Creates standalone executables from Python scripts with the same performance as the original script (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url="https://github.com/marcelotduarte/cx_Freeze/"
|
|
msys2_references=(
|
|
'purl: pkg:pypi/cx-freeze'
|
|
)
|
|
license=('spdx:PSF-2.0')
|
|
depends=(
|
|
"${MINGW_PACKAGE_PREFIX}-python"
|
|
"${MINGW_PACKAGE_PREFIX}-python-filelock"
|
|
"${MINGW_PACKAGE_PREFIX}-python-packaging"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pip"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-cx-logging"
|
|
"${MINGW_PACKAGE_PREFIX}-python-lief"
|
|
"${MINGW_PACKAGE_PREFIX}-python-cabarchive"
|
|
"${MINGW_PACKAGE_PREFIX}-python-striprtf"
|
|
)
|
|
makedepends=(
|
|
"${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-cc"
|
|
"${MINGW_PACKAGE_PREFIX}-tools"
|
|
)
|
|
checkdepends=(
|
|
"${MINGW_PACKAGE_PREFIX}-python-coverage"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pytest"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pytest-mock"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pytest-timeout"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pytest-xdist"
|
|
)
|
|
options=(!strip)
|
|
source=(
|
|
"https://pypi.org/packages/source/${_realname::1}/${_realname/-/_}/${_realname/-/_}-${pkgver}.tar.gz"
|
|
#"${url}/archive/${pkgver}/${_realname}-${pkgver}.tar.gz"
|
|
)
|
|
sha256sums=('d36e804d393aea1b4ad28cff0d8b8a562cc25ea462f06bcf6b265edbc02eecfb')
|
|
|
|
prepare() {
|
|
cd cx_freeze-${pkgver}
|
|
# ignore version check for setuptools
|
|
sed -i 's/"setuptools>=.*"/"setuptools"/' pyproject.toml
|
|
|
|
rm -Rf "${srcdir}"/python-${_realname}-${MSYSTEM}
|
|
cp -a "${srcdir}"/cx_freeze-${pkgver} "${srcdir}"/python-${_realname}-${MSYSTEM}
|
|
}
|
|
|
|
build() {
|
|
cd python-${_realname}-${MSYSTEM}
|
|
python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
check() {
|
|
cd python-${_realname}-${MSYSTEM}
|
|
pip install cx_Freeze -f dist --no-deps --no-index
|
|
coverage run
|
|
}
|
|
|
|
package() {
|
|
cd python-${_realname}-${MSYSTEM}
|
|
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
|
python -m installer --prefix=${MINGW_PREFIX} \
|
|
--destdir="${pkgdir}" dist/*.whl
|
|
install -Dm644 LICENSE.md "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE.md"
|
|
}
|