Files
MINGW-packages/mingw-w64-python3-testpath/PKGBUILD
2019-10-27 17:35:02 +03:00

43 lines
1.6 KiB
Bash

# Maintainer: Peter Budai <peterbudai@hotmail.com>
_realname=testpath
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=0.4.2
pkgrel=2
pkgdesc="Test utilities for code working with files and commands (mingw-w64)"
url="https://pypi.python.org/pypi/testpath"
arch=('any')
license=('MIT')
depends=("${MINGW_PACKAGE_PREFIX}-python3")
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools")
source=(${_realname}-${pkgver}.tar.gz::https://github.com/jupyter/${_realname}/archive/${pkgver}.tar.gz
"https://files.pythonhosted.org/packages/py2.py3/t/${_realname}/${_realname}-${pkgver}-py2.py3-none-any.whl")
sha256sums=('d4f60c121c548e9864dbb8f6f21a5404b0edbebe2a7e63b4b5154a8fa70a23f9'
'46c89ebb683f473ffe2aab0ed9f12581d4d078308a3cb3765d79c6b2317b0109')
prepare() {
rm testpath/cli*.exe
sed -i '/cli-32.exe/d' testpath-${pkgver}.dist-info/RECORD
sed -i '/cli-64.exe/d' testpath-${pkgver}.dist-info/RECORD
sed -i 's/shutil.copy(src, dst)/return/' testpath/commands.py
}
package() {
local _py3_base=$(${MINGW_PREFIX}/bin/python3 -c "import sys;sys.stdout.write('.'.join(map(str, sys.version_info[:2])))")
cd "${srcdir}/${_realname}"
for _i in ./*; do
install -Dm644 ${_i} "${pkgdir}${MINGW_PREFIX}/lib/python${_py3_base}/site-packages/${_realname}/${_i}"
done
_dist="${_realname}-${pkgver}.dist-info"
cd "${srcdir}/${_dist}"
for _i in ./*; do
install -Dm644 $_i "${pkgdir}${MINGW_PREFIX}/lib/python${_py3_base}/site-packages/${_dist}/${_i}"
done
cd "${srcdir}/${_realname}-${pkgver}"
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}-python3/LICENSE"
}