diff --git a/mingw-w64-python-cx_Freeze/0001-fix-build.patch b/mingw-w64-python2-cx_Freeze/0001-fix-build.patch similarity index 100% rename from mingw-w64-python-cx_Freeze/0001-fix-build.patch rename to mingw-w64-python2-cx_Freeze/0001-fix-build.patch diff --git a/mingw-w64-python-cx_Freeze/0002-python37-support.patch b/mingw-w64-python2-cx_Freeze/0002-python37-support.patch similarity index 100% rename from mingw-w64-python-cx_Freeze/0002-python37-support.patch rename to mingw-w64-python2-cx_Freeze/0002-python37-support.patch diff --git a/mingw-w64-python-cx_Freeze/PKGBUILD b/mingw-w64-python2-cx_Freeze/PKGBUILD similarity index 55% rename from mingw-w64-python-cx_Freeze/PKGBUILD rename to mingw-w64-python2-cx_Freeze/PKGBUILD index 9a759f7945..6d7c3ca876 100644 --- a/mingw-w64-python-cx_Freeze/PKGBUILD +++ b/mingw-w64-python2-cx_Freeze/PKGBUILD @@ -4,16 +4,16 @@ _realname=cx_Freeze pkgbase=mingw-w64-python-${_realname} -pkgname=("${MINGW_PACKAGE_PREFIX}-python2-cx_Freeze" - "${MINGW_PACKAGE_PREFIX}-python3-cx_Freeze") +pkgname=("${MINGW_PACKAGE_PREFIX}-python3-cx_Freeze") pkgver=5.1.1 pkgrel=3 pkgdesc="Python package for freezing scripts into executables (mingw-w64)" arch=('any') license=('PSF') url="https://cx-freeze.sourceforge.io/" -makedepends=("${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python3") +depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six") +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools") options=('staticlibs' 'strip' '!debug') source=(cx_Freeze-${pkgver}.tar.gz::https://github.com/anthony-tuininga/cx_Freeze/archive/${pkgver}.tar.gz 0001-fix-build.patch @@ -30,8 +30,6 @@ prepare() { rm -Rf python2-cx_Freeze-${pkgver}-${CARCH} cp -a cx_Freeze-${pkgver} python2-cx_Freeze-${pkgver}-${CARCH} - rm -Rf python3-cx_Freeze-${pkgver}-${CARCH} - cp -a cx_Freeze-${pkgver} python3-cx_Freeze-${pkgver}-${CARCH} } build() { @@ -39,17 +37,9 @@ build() { cd python2-cx_Freeze-${pkgver}-${CARCH} ${MINGW_PREFIX}/bin/python2 setup.py build cd .. - - echo "Building for Python 3" - cd python3-cx_Freeze-${pkgver}-${CARCH} - ${MINGW_PREFIX}/bin/python3 setup.py build - cd .. } -package_python2-cx_Freeze() { - depends=("${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python2-six") - +package() { local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) cd python2-cx_Freeze-${pkgver}-${CARCH} @@ -68,38 +58,3 @@ package_python2-cx_Freeze() { done popd > /dev/null } - -package_python3-cx_Freeze() { - depends=("${MINGW_PACKAGE_PREFIX}-python3" - "${MINGW_PACKAGE_PREFIX}-python3-six") - - local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) - - cd python3-cx_Freeze-${pkgver}-${CARCH} - MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ - --root="${pkgdir}" --optimize=1 - - # fix python command in files - pushd "${pkgdir}${MINGW_PREFIX}"/bin > /dev/null - for filename in cxfreeze cxfreeze-quickstart; do - sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${filename} - done - popd > /dev/null -} - -package_mingw-w64-i686-python2-cx_Freeze() { - package_python2-cx_Freeze -} - -package_mingw-w64-i686-python3-cx_Freeze() { - package_python3-cx_Freeze -} - -package_mingw-w64-x86_64-python2-cx_Freeze() { - package_python2-cx_Freeze -} - -package_mingw-w64-x86_64-python3-cx_Freeze() { - package_python3-cx_Freeze -} diff --git a/mingw-w64-python3-cx_Freeze/PKGBUILD b/mingw-w64-python3-cx_Freeze/PKGBUILD new file mode 100644 index 0000000000..469f6f6163 --- /dev/null +++ b/mingw-w64-python3-cx_Freeze/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Frode Solheim +# Contributor: Duong Pham +# Contributor: Lara Maia + +_realname=cx_Freeze +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python3-cx_Freeze") +pkgver=6.0 +pkgrel=1 +pkgdesc="Python package for freezing scripts into executables (mingw-w64)" +arch=('any') +license=('PSF') +url="https://cx-freeze.sourceforge.io/" +depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six") +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools") +options=('staticlibs' 'strip' '!debug') +source=(cx_Freeze-${pkgver}.tar.gz::https://github.com/anthony-tuininga/cx_Freeze/archive/${pkgver}.tar.gz) +sha256sums=('35185441a388032dc3ecc59e697a16ae00929316d0043aed846dd2e434222580') + +prepare() { + rm -Rf python3-cx_Freeze-${pkgver}-${CARCH} + cp -a cx_Freeze-${pkgver} python3-cx_Freeze-${pkgver}-${CARCH} +} + +build() { + echo "Building for Python 3" + cd python3-cx_Freeze-${pkgver}-${CARCH} + ${MINGW_PREFIX}/bin/python3 setup.py build +} + +package() { + local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) + cd python3-cx_Freeze-${pkgver}-${CARCH} + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 + + # fix python command in files + pushd "${pkgdir}${MINGW_PREFIX}"/bin > /dev/null + for filename in cxfreeze cxfreeze-quickstart; do + sed -e "s|${_mingw_prefix}/bin/|/usr/bin/env |g" -i ${filename} + done + popd > /dev/null +}