archrelease: copy trunk to community-any
[ArchLinux/community.git] / twine / trunk / PKGBUILD
blob892b56bac8192a02ffb5fd38c9c3de56fa32e4bc
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Chris Warrick <aur@chriswarrick.com>
4 pkgname=twine
5 pkgver=4.0.2
6 _commit=75c3d8623c0847d8ce5a59c1d14a9fcc71e2a4a2
7 pkgrel=4
8 pkgdesc='Collection of utilities for interacting with PyPI'
9 arch=('any')
10 url='https://github.com/pypa/twine/'
11 license=('Apache')
12 depends=('python-pkginfo' 'python-readme-renderer' 'python-requests' 'python-requests-toolbelt'
13          'python-urllib3' 'python-importlib-metadata' 'python-keyring' 'python-rfc3986'
14          'python-rich')
15 makedepends=('git' 'python-build' 'python-installer' 'python-setuptools-scm' 'python-wheel')
16 checkdepends=('git' 'python-munch' 'python-jaraco.envs' 'python-portend' 'python-pretend' 'python-tox'
17               'python-pytest-cov' 'python-pytest-services' 'python-pytest-socket')
18 provides=('python-twine')
19 conflicts=('python-twine')
20 replaces=('python-twine')
21 source=("git+https://github.com/pypa/twine.git#commit=$_commit")
22 sha512sums=('SKIP')
24 build() {
25   cd $pkgname
26   python -m build -nw
29 check() {
30   cd $pkgname
31   # Ignored tests are copied from upstream tox.ini:
32   # https://github.com/pypa/twine/blob/4.0.2/tox.ini#L16
33   python -m pytest --ignore-glob '*integration*.py'
36 package() {
37   cd $pkgname
38   python -m installer -d "$pkgdir" dist/*.whl
39   ln -s twine "$pkgdir"/usr/bin/twine3