blob: d179baca1cdf9784ccbf339cb33fa3055d7d2fba [file] [log] [blame] [edit]
# 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}")
provides=("${MINGW_PACKAGE_PREFIX}-python3-cx_Freeze"
"${MINGW_PACKAGE_PREFIX}-python-cx_Freeze")
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-cx_Freeze"
"${MINGW_PACKAGE_PREFIX}-python-cx_Freeze")
replaces=("${MINGW_PACKAGE_PREFIX}-python3-cx_Freeze"
"${MINGW_PACKAGE_PREFIX}-python-cx_Freeze")
pkgver=6.6
pkgrel=2
pkgdesc="Creates standalone executables from Python scripts, with the same performance (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
license=('PSF')
url="https://github.com/marcelotduarte/cx_Freeze/"
depends=("${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-python-cx-logging"
"${MINGW_PACKAGE_PREFIX}-python-importlib-metadata")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
options=('staticlibs' 'strip' '!debug')
source=(cx_Freeze-${pkgver}.tar.gz::https://pypi.io/packages/source/c/cx_Freeze/cx_Freeze-${pkgver}.tar.gz)
sha256sums=('c4af8ad3f7e7d71e291c1dec5d0fb26bbe92df834b098ed35434c901fbd6762f')
prepare() {
rm -Rf python-${_realname}-${CARCH}
cp -a cx_Freeze-${pkgver} python-${_realname}-${CARCH}
}
build() {
echo "Building for Python"
cd python-${_realname}-${CARCH}
${MINGW_PREFIX}/bin/python setup.py build
}
package() {
local _mingw_prefix=$(cygpath -wm ${MINGW_PREFIX})
cd python-${_realname}-${CARCH}
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
# fix python command in files
for filename in "${pkgdir}${MINGW_PREFIX}/bin/cxfreeze*script.py"; do
sed -e "s|${_mingw_prefix}/bin/||g" -i ${filename}
done
}