summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorUniversebenzene2019-10-02 21:18:53 +0800
committerUniversebenzene2019-10-02 21:18:53 +0800
commitc756c6e973484f165c44bfcb8bf4cc6beff87b8e (patch)
treee47a5660e0b8f5b1224be22e3cc32d38c97476f3 /PKGBUILD
downloadaur-c756c6e973484f165c44bfcb8bf4cc6beff87b8e.tar.gz
Initial import 1.0.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..945ee43c25b3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Astro Benzene <universebenzene at sina dot com>
+pkgbase=python-parfive
+_pyname=${pkgbase#python-}
+pkgname=("python-${_pyname}" "python-${_pyname}-doc")
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="A HTTP and FTP parallel file downloader"
+arch=('i686' 'x86_64')
+url="https://parfive.readthedocs.io/"
+license=('MIT')
+makedepends=('python-setuptools' 'python-sphinx-astropy' 'python-aiohttp' 'python-tqdm' 'graphviz' 'python-sunpy-sphinx-theme')
+checkdepends=('python-pytest-localserver')
+source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
+md5sums=('093d52b99263398e902c70a1f128f3ca')
+
+build() {
+ cd ${srcdir}/${_pyname}-${pkgver}
+ python setup.py build
+
+ msg "Building Docs"
+ python setup.py build_sphinx
+}
+
+check() {
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ python setup.py test
+}
+
+package_python-parfive() {
+ depends=('python>=3.5' 'python-tqdm' 'python-aiohttp')
+ optdepends=('python-parfive-doc: Documentation for Parfive')
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -D -m644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+ python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
+}
+
+package_python-parfive-doc() {
+ pkgdesc="Documentation for Python Parfive"
+ cd ${srcdir}/${_pyname}-${pkgver}/build/sphinx
+
+ install -D -m644 ../../LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
+ cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
+}