archrelease: copy trunk to community-any
[ArchLinux/community.git] / ufmt / repos / community-any / PKGBUILD
blob4c09f08c4d432d6853626f2c9b4c47f1deafd917
1 # Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
3 pkgname=ufmt
4 pkgver=2.0.1
5 pkgrel=4
6 pkgdesc='Safe, atomic formatting with black and µsort'
7 arch=('any')
8 url='https://github.com/omnilib/ufmt'
9 license=('MIT')
10 depends=('python-black' 'python-click' 'python-libcst' 'python-moreorless'
11          'python-tomlkit' 'python-trailrunner' 'python-typing_extensions' 'usort')
12 makedepends=('python-build' 'python-installer' 'python-flit-core' 'python-wheel')
13 source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
14 sha512sums=('a6a4619169852be354fa6c037607d11f2a78aa16276ea80a1ba2db569f469d04eaa1894d6e39bc374b4c7ef5a681f1ffc43c965abe893a0f415153d8bac7a7e3')
16 build() {
17   cd $pkgname-$pkgver
19   python -m build -nwx
22 check() {
23   cd $pkgname-$pkgver
25   python -m ufmt.tests
28 package() {
29   cd $pkgname-$pkgver
31   python -m installer -d "$pkgdir" dist/*.whl
33   install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
36 # vim:set ts=2 sw=2 et: