56 lines
2.1 KiB
Bash
56 lines
2.1 KiB
Bash
# Maintainer: Ryuta Suzuki <oroppas@gmail.com>
|
|
|
|
_realname=path
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=16.4.0
|
|
pkgrel=2
|
|
provides=("${MINGW_PACKAGE_PREFIX}-python3-path=${pkgver}"
|
|
"${MINGW_PACKAGE_PREFIX}-python-path.py")
|
|
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-path"
|
|
"${MINGW_PACKAGE_PREFIX}-python-path.py")
|
|
replaces=("${MINGW_PACKAGE_PREFIX}-python3-path"
|
|
"${MINGW_PACKAGE_PREFIX}-python-path.py")
|
|
pkgdesc="File system based database that uses python pickles (mingw-w64)"
|
|
url="https://pypi.org/project/path/"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
|
license=('MIT')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
|
"${MINGW_PACKAGE_PREFIX}-python-importlib-metadata")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm"
|
|
"${MINGW_PACKAGE_PREFIX}-python-wheel")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest-runner"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pytest-flake8")
|
|
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/jaraco/path/archive/v${pkgver}.tar.gz")
|
|
sha512sums=('fefb50da55ad77cdb61c7c4a05eeffaae9f6db349ce0b75d5e37ca8e3152deff19c6c1556e9efbe7faeaf569342a670fc360a4e650e65f509a68a62130d7d093')
|
|
|
|
prepare() {
|
|
rm -rf python-build-${CARCH}
|
|
cp -r "path-${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 -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/python-build-${CARCH}"
|
|
${MINGW_PREFIX}/bin/python -m pytest || true
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/python-build-${CARCH}"
|
|
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
|
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
|
|
--destdir="${pkgdir}" dist/*.whl
|
|
|
|
install -Dm644 LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE
|
|
}
|