Skip to content

Commit

Permalink
python3-typed-ast: update to 1.4.3.
Browse files Browse the repository at this point in the history
* remove do_patch(), because the changes were upstreamed
  by sgn and CameronNemo in
python/typed_ast@43599d6
  • Loading branch information
paper42 committed Jul 12, 2021
1 parent 2148b18 commit 01b6b5c
Showing 1 changed file with 6 additions and 27 deletions.
33 changes: 6 additions & 27 deletions 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 <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
}

0 comments on commit 01b6b5c

Please sign in to comment.