Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove do_patch(), because the changes were upstreamed by sgn and CameronNemo in python/typed_ast@43599d6
- Loading branch information
Showing
1 changed file
with
6 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |