summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 71c56b7cbb93802322f0e0d1b863d23cc1adc03f (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
# Maintainer: Dimitris Kiziridis <ragouel at outlook dot com>

_base=python-anyconfig
pkgname=${_base}-git
pkgver=0.12.0.r0.g09af1950
pkgrel=1
pkgdesc="Generic access to configuration files in any formats (to be in the future)"
url="https://github.com/ssato/${_base}"
arch=('any')
license=(MIT)
provides=("${_base}")
conflicts=("${_base}")
depends=(python-toml python-ruamel-yaml python-jinja python-jmespath python-jsonschema)
makedepends=(python-setuptools git)
optdepends=(
  'python-simplejson: Replace standard json backend'
  'python-yaml: YAML support if ruamel.yaml is not aviliable'
  'python-anyconfig-bson-backend: BSON support using pymongo'
  'python-anyconfig-ion-backend: Amazon ion load and dump support'
  'python-anyconfig-cbor-backend: CBOR support using cbor'
  'python-anyconfig-cbor2-backend: CBOR support using cbor2'
  'python-anyconfig-configobj-backend: ConfigObj load and dump support'
  'python-anyconfig-msgpack-backend: MessagePack load and dump support'
  'python-anyconfig-json5-backend: Json5 load and dump support'
  'python-anyconfig-fortios-backend: Fortios load and parse support'
)
source=(${_base}::git+${url})
sha256sums=('SKIP')

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

build() {
  cd ${_base}
  python setup.py build
}

package() {
  cd ${_base}
  export PYTHONHASHSEED=0
  PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm 644 LICENSE.MIT -t "${pkgdir}/usr/share/licenses/${pkgname}"
}