python3-typed-ast: update to 1.4.3.

* remove do_patch(), because the changes were upstreamed
  by sgn and CameronNemo in
43599d6dbf
This commit is contained in:
Michal Vasilek 2021-07-11 14:02:11 +02:00 committed by Érico Nogueira Rolim
parent 13a86ca529
commit a09b29dfdf

View file

@ -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 <whoami@systemli.org>"
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
}