summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 33a19373e0761b014d6fcfd32fadc8492a2e798d (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
# Maintainer: xginn8 <mamcgi@gmail.com>
# Contributor: Caltlgin Stsodaat <contact@fossdaily.xyz>
# Contributor: Dan Beste <Dan.Ray.Beste@gmail.com>
# Contributor: Daniel M. Capella <polyzen@archlinux.org>

_pkgname='python-black'
pkgname="${_pkgname}-git"
pkgver=21.8b0.r2.g77d11bb
pkgrel=1
pkgdesc='Uncompromising Python code formatter'
arch=('any')
url='https://github.com/psf/black'
license=('MIT')
depends=('python'
        'python-appdirs'
        'python-click'
        'python-mypy_extensions'
        'python-pathspec'
        'python-regex'
        'python-setuptools'
        'python-toml'
        'python-typed-ast'
        'python-typing_extensions')
makedepends=('git' 'python-setuptools')
optdepends=('python-aiohttp: for the blackd HTTP server'
            'python-aiohttp-cors: for the blackd HTTP server'
            'python-colorama: for colored diffs')
provides=("${_pkgname}")
source=("${_pkgname}::git+${url}.git")
sha256sums=('SKIP')

pkgver() {
  git -C "${_pkgname}" describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "${_pkgname}"
  python setup.py build
}

package() {
  cd "${_pkgname}"
  python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}" 'README.md'
  install -Dm644 -t "${pkgdir}/usr/share/licenses/${_pkgname}" 'LICENSE'
}

# vim: ts=2 sw=2 et: