Files
MINGW-packages/mingw-w64-python-pyfilesystem2/PKGBUILD
2023-09-17 21:57:36 +02:00

59 lines
2.0 KiB
Bash

# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
_realname=pyfilesystem2
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=2.4.16
pkgrel=2
pkgdesc="Python's filesystem abstraction layer (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
msys2_references=(
'archlinux: python-fs'
)
url='https://github.com/PyFilesystem/pyfilesystem2'
license=('MIT')
depends=("${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-python-appdirs"
"${MINGW_PACKAGE_PREFIX}-python-pytz"
"${MINGW_PACKAGE_PREFIX}-python-six")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
# We would require "${MINGW_PACKAGE_PREFIX}-python-pyftpdlib"
#checkdepends=("${MINGW_PACKAGE_PREFIX}-python-mock"
# "${MINGW_PACKAGE_PREFIX}-python-pyftpdlib")
options=('staticlibs' 'strip' '!debug')
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/PyFilesystem/pyfilesystem2/archive/v${pkgver}.tar.gz")
sha256sums=('c06b2570fe8cb425d0bda70c518becfc97b6e49bab289edae9359a4fb606d43e')
prepare() {
rm -rf python-build-${CARCH} | true
cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
}
build() {
cd "${srcdir}/python-build-${CARCH}"
${MINGW_PREFIX}/bin/python setup.py build
}
# We would require "${MINGW_PACKAGE_PREFIX}-python-pyftpdlib"
#check() {
# cd "${srcdir}/python-build-${CARCH}"
# ${MINGW_PREFIX}/bin/python setup.py test
#}
package() {
cd "${srcdir}/python-build-${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
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}