Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
upgpkg: python-fire 0.5.0-1: Upgrade to 0.5.0.
Browse files Browse the repository at this point in the history
Switch to PEP517.
Remove test files: google/python-fire#422

git-svn-id: file:///srv/repos/svn-community/svn@1359238 9fca08f4-af9d-4005-b8df-a31f2cc04f65
  • Loading branch information
dvzrv committed Dec 15, 2022
1 parent 809b568 commit ae5728f
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions python-fire/trunk/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,36 @@

_name=fire
pkgname=python-fire
pkgver=0.4.0
pkgrel=3
pkgver=0.5.0
pkgrel=1
pkgdesc="A library for automatically generating command line interfaces"
arch=('any')
arch=(any)
url="https://github.com/google/python-fire"
license=('Apache')
depends=('python-six' 'python-termcolor')
makedepends=('python-setuptools')
checkdepends=('python-hypothesis' 'python-levenshtein' 'python-mock' 'python-pytest')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
sha256sums=('c5e2b8763699d1142393a46d0e3e790c5eb2f0706082df8f647878842c216a62')
b2sums=('954de570e593b262468c6f9dabd25c2056a19c50037b91392a3305d455b0bc224a09b31071b86fbc490be5df5b42715412d62c624e3e3efe8d21e6db6c6c67f8')

prepare() {
mv -v "${_name}-$pkgver" "$pkgname-$pkgver"
cd "$pkgname-$pkgver"
}
license=(Apache)
depends=(python-six python-termcolor)
makedepends=(python-build python-installer python-setuptools python-wheel)
checkdepends=(python-hypothesis python-levenshtein python-mock python-pytest)
source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
sha256sums=('a6b0d49e98c8963910021f92bba66f65ab440da2982b78eb1bbf95a0a34aacc6')
b2sums=('eecaceb95faba05a0f2b157560f690d9cee0a10939c2f376b8563955171299ada4b522775450443d9ff9ad31092cf4967a7fc77f7cd1eaab30c9450291a9dbeb')

build() {
cd "$pkgname-$pkgver"
python setup.py build
cd $_name-$pkgver
python -m build --wheel --no-isolation
}

check() {
cd "$pkgname-$pkgver"
export PYTHONPATH="build:${PYTHONPATH}"
cd $_name-$pkgver
export PYTHONPATH="build:$PYTHONPATH"
pytest -v
}

package() {
cd "$pkgname-$pkgver"
python setup.py install --optimize=1 --root="${pkgdir}"
install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")

cd $_name-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
# remove test files: https://github.com/google/python-fire/issues/422
rm -frv "$pkgdir/$_site_packages/$_name/"{testutils,*_test}.py
}

0 comments on commit ae5728f

Please sign in to comment.