summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3a5104e4eec07fa7a97970b0ae2dd2aee9d072d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: Lukasz Pozarlik <lpozarlik@gmail.com>
# Co-Maintainer: Martin Rys <rys.pw/contact>
# Contributor: Carl George < arch at cgtx dot us >
# Contributor: Duy Truong <jimreynold2nd@yahoo.com>
# Contributor: Vyacheslav Konovalov <vyachkonovalov@protonmail.com>

pkgname='python-jira'
_pkgname='jira'
pkgdesc='Python library to work with Jira APIs'
pkgver=3.6.0
pkgrel=4
url='https://github.com/pycontribs/jira'
license=('BSD-2-Clause')
arch=('any')
# TODO not sure what to do about 'python-filemagic'
#   https://github.com/pycontribs/jira/blob/main/setup.cfg
#   https://archlinux.org/todo/replace-filepython-magic-aka-file-magic-with-ahupppython-magic/
depends=(
	'python-defusedxml'
	'python-requests-oauthlib'
	'python-packaging'
	'python-pillow'
	'python-typing_extensions'
	'python-requests'
	'python-requests-toolbelt')
optdepends=(
	'ipython: jirashell'
	'python-keyring: jirashell')
makedepends=(
	'python-setuptools'
	'python-build'
	'python-wheel'
	'python-setuptools-scm'
	'python-installer')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/pycontribs/jira/archive/refs/tags/${pkgver}.tar.gz")
sha256sums=('879cb1eb6a84b0c7c94cd3c80c7740fc1d3b88d45b2a5f6c8e599b349a77ca3b')

build() {
	cd "${srcdir}/jira-${pkgver}"
	export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
	python -m build --wheel --no-isolation
}

package() {
	cd "${srcdir}/jira-${pkgver}"
	python -m installer --destdir="${pkgdir}" dist/*.whl
	install -Dm 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
	local site_packages
	site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
	rm -rf "${pkgdir}/${site_packages}/tests"
}