summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD59
1 files changed, 59 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ea9d0cf7f3e4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Philipp A. <flying-sheep@web.de>
+
+_pkgname=aiohttp
+pkgname=python-${_pkgname}-git
+pkgver=4.0.0a1.r857.gac0398a4
+pkgrel=1
+pkgdesc='HTTP client/server for asyncio'
+url='https://aiohttp.readthedocs.io'
+arch=('x86_64')
+license=('Apache')
+depends=('python' 'python-chardet' 'python-multidict' 'python-async-timeout'
+ 'python-yarl' 'python-attrs')
+makedepends=('cython' 'python-setuptools' 'git')
+checkdepends=('python-pytest' 'python-pytest-runner' 'python-pytest-mock'
+ 'python-pytest-timeout' 'python-async_generator' 'python-brotli'
+ 'python-pytest-xdist' 'python-pytest-forked' 'python-pytest-cov'
+ 'python-trustme' 'python-freezegun' 'gunicorn' 'python-re-assert')
+optdepends=('gunicorn: to deploy using Gunicorn'
+ 'python-aiodns: for fast DNS resolving'
+ 'python-cchardet: for faster encoding detection'
+ 'python-brotli: for Brotli transfer-encodings support')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=(${_pkgname}::"git+https://github.com/aio-libs/aiohttp"
+ git+https://github.com/nodejs/http-parser)
+sha512sums=('SKIP'
+ 'SKIP')
+
+pkgver() {
+ cd ${_pkgname}
+ git describe --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd ${_pkgname}
+ git submodule init
+ git config submodule."vendor/http-parser".url "${srcdir}/http-parser"
+ git submodule update --recursive
+ sed 's|.install-cython ||' -i Makefile
+}
+
+build() {
+ cd ${_pkgname}
+ make cythonize
+ python setup.py build
+}
+
+check() {
+ cd ${_pkgname}
+ python setup.py test
+}
+
+package() {
+ cd ${_pkgname}
+ python setup.py install --root="${pkgdir}" -O1 --skip-build
+}
+
+# vim: ts=2 sw=2 et: