Skip to content

Commit 14c42cd

Browse files
authored
python-defusedcsv: add package (#4551)
1 parent 232fa17 commit 14c42cd

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

packages/python-defusedcsv/PKGBUILD

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Originally from: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=python-defusedcsv
2+
3+
pkgname=python-defusedcsv
4+
_pkgname=defusedcsv
5+
pkgver=2.0.0
6+
pkgrel=1
7+
pkgdesc='Drop-in replacement for Python CSV library that tries to mitigate CSV injection attacks'
8+
arch=('any')
9+
url='https://github.com/raphaelm/defusedcsv'
10+
license=('Apache-2.0')
11+
depends=('python')
12+
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
13+
source=("$url/archive/refs/tags/v$pkgver.tar.gz")
14+
sha512sums=('7ea60e23025b2392a34fbc0aa5ef6dd1b6ce0c653000e4121fceed4159b99b233c34f0f8f1e06931e721a8c923e90faa63b39d0032ab1881ff94eaea66345d4a')
15+
16+
# https://wiki.archlinux.org/title/Python_package_guidelines#Standards_based_(PEP_517)
17+
build() {
18+
cd "$_pkgname-$pkgver"
19+
python -m build --wheel --no-isolation
20+
}
21+
22+
package() {
23+
cd "$_pkgname-$pkgver"
24+
install -Dm644 "$srcdir/$_pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
25+
python -m installer --destdir="$pkgdir" dist/*.whl
26+
}

0 commit comments

Comments
 (0)