Date: Saturday, April 8, 2023 @ 12:38:12
Author: felixonmars
Revision: 1442335
archrelease: copy trunk to community-staging-any
Added:
csvkit/repos/community-staging-any/
csvkit/repos/community-staging-any/PKGBUILD
(from rev 1442333, csvkit/trunk/PKGBUILD)
----------+
PKGBUILD | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
Copied: csvkit/repos/community-staging-any/PKGBUILD (from rev 1442333,
csvkit/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-08 12:38:12 UTC (rev 1442335)
@@ -0,0 +1,49 @@
+# Maintainer: Caleb Maclennan <[email protected]>
+# Contributor: Michał Pałubicki <[email protected]>
+
+pkgname=csvkit
+pkgver=1.0.7
+pkgrel=2
+pkgdesc='A suite of utilities for converting to and working with CSV'
+arch=(any)
+url="https://$pkgname.readthedocs.org"
+license=(MIT)
+_pydeps=(agate
+ agate-dbf
+ agate-excel
+ agate-sql
+ six
+ sphinx_rtd_theme)
+depends=(python
+ "${_pydeps[@]/#/python-}")
+optdepends=('ipython: nicer command-line for csvpy utility')
+makedepends=(python-{build,installer,wheel}
+ python-setuptools
+ python-sphinx)
+checkdepends=(python-pytest
+ python-pytimeparse)
+_archive="$pkgname-$pkgver"
+source=("$_archive.tgz::https://github.com/wireservice/$pkgname/archive/$pkgver.tar.gz")
+sha256sums=('84adaa554672bac5cd1d84d40183f86be1bec5a198119046e79409e371546d20')
+
+build() {
+ cd "$_archive"
+ python -m build -wn
+ python setup.py build_sphinx
+ _rtd_theme_path="$(python -c 'import sphinx_rtd_theme;
print(sphinx_rtd_theme.get_html_theme_path())')"
+ rm -rvf "build/sphinx/html/_static"
+ ln -svf "$_rtd_theme_path/sphinx_rtd_theme/static"
"build/sphinx/html/_static"
+}
+
+check() {
+ cd "$_archive"
+ pytest tests
+}
+
+package() {
+ cd "$_archive"
+ python -m installer -d "$pkgdir" dist/*.whl
+ install -dm0755 "$pkgdir/usr/share/doc/"
+ cp -rv build/sphinx/html "$pkgdir/usr/share/doc/$pkgname"
+ install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" COPYING
+}