From 01b6b5cdc9fb6348e1470ace207ed9cef8f0880d Mon Sep 17 00:00:00 2001 From: Michal Vasilek Date: Sun, 11 Jul 2021 14:02:11 +0200 Subject: [PATCH] python3-typed-ast: update to 1.4.3. * remove do_patch(), because the changes were upstreamed by sgn and CameronNemo in https://github.com/python/typed_ast/commit/43599d6dbf10c923f5fe10d9dc9c182bef9db4b9 --- srcpkgs/python3-typed-ast/template | 33 ++++++------------------------ 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/srcpkgs/python3-typed-ast/template b/srcpkgs/python3-typed-ast/template index 8461f830a8cb..1e5bbf1d855f 100644 --- a/srcpkgs/python3-typed-ast/template +++ b/srcpkgs/python3-typed-ast/template @@ -1,40 +1,19 @@ # Template file for 'python3-typed-ast' pkgname=python3-typed-ast -version=1.4.2 +version=1.4.3 revision=1 wrksrc="typed_ast-${version}" build_style=python3-module hostmakedepends="python3-setuptools" makedepends="python3-devel" -short_desc="Ast module with type comment support" +checkdepends="python3-pytest" +short_desc="AST module with type comment support" maintainer="whoami " license="Apache-2.0" homepage="https://github.com/python/typed_ast" distfiles="https://github.com/python/typed_ast/archive/${version}.tar.gz" -checksum=be4b75ea880768489e30818267cf920027ed99014001ac428aedd0b31bbfc899 +checksum=c393d5576856f50189e741c38850e529f38aeb77fd7b40d2d9b1f4340e802faa -do_patch() { - # python3-typed-ast uses the same header name with Python - # Thus, we'll run to problem on cross-compile. - # Fix it by specify include file relative to the file. - # And -Iast/Include - local _ifile _rfile - local _ast27_re="" - local _ast3_re="" - cd ast27/Include - for _ifile in *.h; do - _rfile=${_ifile/./[.]} - _ast27_re+="s%^[[:space:]]*#[[:space:]]*include[[:space:]]*\"$_rfile\".*$%#include \"../Include/$_ifile\"%;" - done - cd .. - find . -type f -exec sed -i -e "$_ast27_re" {} + - cd .. - cd ast3/Include - for _ifile in *.h; do - _rfile=${_ifile/./[.]} - _ast3_re+="s%^[[:space:]]*#[[:space:]]*include[[:space:]]*\"$_rfile\".*$%#include \"../Include/$_ifile\"%;" - done - cd .. - find . -type f -exec sed -i -e "$_ast3_re" {} + - cd .. +do_check() { + PYTHONPATH="$(cd build/lib* && pwd)" pytest }