46 lines
1.3 KiB
Bash
46 lines
1.3 KiB
Bash
# Template file for 'backblaze-b2'
|
|
pkgname=backblaze-b2
|
|
version=1.4.2
|
|
revision=5
|
|
wrksrc="b2-${version}"
|
|
build_style=python3-module
|
|
hostmakedepends="python3-setuptools"
|
|
depends="python3-logfury python3-Arrow python3-requests python3-six
|
|
python3-tqdm python-b2sdk"
|
|
checkdepends="python3-pytest $depends python3-pyflakes python3-mock
|
|
python3-dateutil python3-nose"
|
|
short_desc="Command Line Interface for Backblaze's B2 storage service"
|
|
maintainer="Andrea Brancaleoni <abc@pompel.me>"
|
|
license="MIT"
|
|
homepage="https://github.com/Backblaze/B2_Command_Line_Tool"
|
|
distfiles="${PYPI_SITE}/b/b2/b2-${version}.tar.gz"
|
|
checksum=f0a3baf0a94b4c4cc652c5206a03311516742fe87a0e33b51c06adf3eb89c054
|
|
replaces="python-b2>=0"
|
|
provides="python-b2-${version}_${revision}"
|
|
|
|
post_patch() {
|
|
# this files is necessary for do_check
|
|
# the files is copied directly from its GitHub's repository
|
|
cp "$FILESDIR/test_b2_command_line.py" "$wrksrc"
|
|
}
|
|
|
|
post_install() {
|
|
# Remove test directory polluting site-packages
|
|
rm -rf ${DESTDIR}/usr/lib/python*/site-packages/test
|
|
|
|
# Avoid conflict with Boost's b2 tool
|
|
mv ${DESTDIR}/usr/bin/b2 ${DESTDIR}/usr/bin/backblaze-b2
|
|
|
|
vlicense LICENSE
|
|
}
|
|
|
|
do_check() {
|
|
python3 setup.py nosetests
|
|
}
|
|
|
|
python-b2_package() {
|
|
depends="backblaze-b2>=${version}_${revision}"
|
|
build_style=meta
|
|
short_desc+=" - transitional package"
|
|
}
|