summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2020-03-04 09:07:26 +0300
committerCaleb Maclennan2020-03-04 09:07:26 +0300
commitb7c89aa745e77ae6eb372c5fb5c487806af5f6b5 (patch)
tree4107fb948c41f039b95a77ddcb5bc85b502513db
parentbc22ef4f202df6d0e8b7bf5e04f3a2a7cc6bb933 (diff)
downloadaur-python-agate-sql.tar.gz
Split build() and package() stages, correct docs path
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD40
2 files changed, 30 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9137ee50be6..d4e59e75cfe 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,19 @@
pkgbase = python-agate-sql
pkgdesc = Adds SQL read/write support to agate
pkgver = 0.5.4
- pkgrel = 1
+ pkgrel = 2
url = http://agate-sql.readthedocs.org/
arch = any
license = MIT
+ checkdepends = python-crate
makedepends = python-setuptools
makedepends = python-sphinx>=1.2.2
depends = python
depends = python-agate>=1.5.0
- depends = python-sqlalchemy>=1.0.8
depends = python-sphinx_rtd_theme>=0.1.6
- optdepends = python-crate-git
- source = https://github.com/wireservice/agate-sql/archive/0.5.4.tar.gz
+ depends = python-sqlalchemy>=1.0.8
+ optdepends = python-crate
+ source = agate-sql-0.5.4.tar.gz::https://github.com/wireservice/agate-sql/archive/0.5.4.tar.gz
sha256sums = 15eed2f24972907213809033a5cb138e9299724a638229476e9bd791401c0461
pkgname = python-agate-sql
diff --git a/PKGBUILD b/PKGBUILD
index 86be20d08ac..2f9c9b614f1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,48 @@
# Contributor: Michał Pałubicki <maln0ir@gmx.com>
+# Maintainer: Caleb Maclennan <caleb@alerque.com>
_pkgname=agate-sql
pkgname=python-$_pkgname
pkgver=0.5.4
-pkgrel=1
-pkgdesc="Adds SQL read/write support to agate"
+pkgrel=2
+pkgdesc='Adds SQL read/write support to agate'
arch=('any')
-url="http://agate-sql.readthedocs.org/"
+url='http://agate-sql.readthedocs.org/'
license=('MIT')
depends=(
'python'
'python-agate>=1.5.0'
- 'python-sqlalchemy>=1.0.8'
'python-sphinx_rtd_theme>=0.1.6'
+ 'python-sqlalchemy>=1.0.8'
)
optdepends=(
- 'python-crate-git'
+ 'python-crate'
)
makedepends=(
'python-setuptools'
'python-sphinx>=1.2.2'
)
-source=("https://github.com/wireservice/agate-sql/archive/${pkgver}.tar.gz")
+checkdepends=($optdepends)
+source=("$_pkgname-$pkgver.tar.gz::https://github.com/wireservice/$_pkgname/archive/$pkgver.tar.gz")
sha256sums=('15eed2f24972907213809033a5cb138e9299724a638229476e9bd791401c0461')
-package() {
- cd "$srcdir/$_pkgname-$pkgver"
- python setup.py install --root="$pkgdir/" --optimize=1
+build() {
+ cd "$_pkgname-$pkgver"
+ python setup.py build
+ 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"
+}
- python setup.py build_sphinx
- mkdir -p "$pkgdir/usr/share/doc"
- cp -rv "$srcdir/$_pkgname-$pkgver/build/sphinx/html" "$pkgdir/usr/share/doc/$_pkgname"
+check() {
+ cd "$_pkgname-$pkgver"
+ python setup.py test --test-suite=tests
+}
- _rtd_theme_path="$(python -c 'import sphinx_rtd_theme; print(sphinx_rtd_theme.get_html_theme_path())')"
- rm -rvf "$pkgdir/usr/share/doc/$_pkgname/_static"
- ln -svf "$_rtd_theme_path/sphinx_rtd_theme/static" "$pkgdir/usr/share/doc/$_pkgname/_static"
+package() {
+ cd "$_pkgname-$pkgver"
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ mkdir -p "$pkgdir/usr/share/doc"
+ cp -rv "build/sphinx/html" "$pkgdir/usr/share/doc/$pkgname"
}