aiohttp: fixed C extension, but requires git

This commit is contained in:
Sarah Ottinger
2020-12-25 18:24:43 -08:00
committed by Christoph Reiter
parent 029a371ebb
commit 2646ca4158
2 changed files with 20 additions and 12 deletions

2
mingw-w64-python-aiohttp/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
aiohttp/
http-parser/

View File

@@ -1,10 +1,10 @@
# Maintainer: Sarah Ottinger <schalaalexiazeal@gmail.com>
_realname=aiohttp
_parser_ver=2.9.4
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=3.7.3
_gitcommit=2f655a59d0daedfa2a794996c4355b576c98ecc8
pkgrel=1
pkgdesc='HTTP client/server for asyncio (mingw-w64)'
arch=('any')
@@ -14,7 +14,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-python-async-timeout"
"${MINGW_PACKAGE_PREFIX}-python-attrs"
"${MINGW_PACKAGE_PREFIX}-python-chardet"
"${MINGW_PACKAGE_PREFIX}-python-yarl")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools" "${MINGW_PACKAGE_PREFIX}-cython")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools" "${MINGW_PACKAGE_PREFIX}-cython" "git")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-freezegun"
"${MINGW_PACKAGE_PREFIX}-python-pytest-runner"
"${MINGW_PACKAGE_PREFIX}-python-pytest-cov"
@@ -23,18 +23,24 @@ checkdepends=("${MINGW_PACKAGE_PREFIX}-python-freezegun"
"${MINGW_PACKAGE_PREFIX}-python-pytest-timeout"
"${MINGW_PACKAGE_PREFIX}-python-pytest-xdist"
"${MINGW_PACKAGE_PREFIX}-python-trustme")
source=("https://github.com/aio-libs/aiohttp/archive/v$pkgver.tar.gz")
#"https://github.com/nodejs/http-parser/archive/v${_parser_ver}.tar.gz")
sha256sums=('2caac02447ff5d5b2db30a828fe676e90bb01c384e7751392784b68b7c7fcc18')
#'467b9e30fd0979ee301065e70f637d525c28193449e1b13fbcb1b1fab3ad224f')
source=("git+https://github.com/aio-libs/aiohttp#commit=${_gitcommit}"
"git+https://github.com/nodejs/http-parser")
sha256sums=('SKIP'
'SKIP')
pkgver() {
cd $srcdir/${_realname}
git describe --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "$srcdir"
cd "$srcdir/${_realname}"
git submodule init
git config submodule."vendor/http-parser".url "${srcdir}/http-parser"
git submodule update --recursive
cd ..
rm -rf python-build-${CARCH} | true
rm -rf http-parser | true
cp -r "${_realname}-$pkgver" "python-build-${CARCH}"
#cp -r "http-parser-${_parser_ver}" "http-parser"
#mv "http-parser" "python-build-${CARCH}/vendor/"
cp -r "${_realname}" "python-build-${CARCH}"
cd "${srcdir}/python-build-${CARCH}"
sed 's|.install-cython ||' -i Makefile
}
@@ -42,7 +48,7 @@ prepare() {
build() {
msg "Python build for ${CARCH}"
cd "${srcdir}/python-build-${CARCH}"
#make cythonize
make cythonize
${MINGW_PREFIX}/bin/python setup.py build
}