archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-attrdict / trunk / PKGBUILD
blobda665620aa086c06d58c8607057b32a30e19613a
1 # Maintainer:
2 # Contributor: Donald Webster <fryfrog@gmail.com>
4 pkgname=python-attrdict
5 _name=${pkgname#python-}
6 pkgver=2.0.1
7 pkgrel=6
8 pkgdesc='A library that provides mapping objects that allow their elements to be accessed both as keys and as attributes'
9 arch=(any)
10 url='https://pypi.org/project/attrdict/'
11 license=(MIT)
12 depends=(python)
13 makedepends=(python-build python-installer python-setuptools python-wheel)
14 source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
15 sha256sums=('35c90698b55c683946091177177a9e9c0713a0860f0e049febd72649ccd77b70')
17 prepare() {
18   cd $_name-$pkgver
19 # Fix for python 3.10
20   find . -type f -iname '*.py' -exec sed -i 's/collections/collections.abc/g' {} +
23 build() {
24   cd $_name-$pkgver
25   python -m build --wheel --no-isolation
28 package() {
29   cd $_name-$pkgver
30   python -m installer --destdir="$pkgdir" dist/*.whl
31   install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname