Skip to content

Commit 1b97208

Browse files
author
jhuntwork
committed
Merge pull request ':sparkles: extra/pycparser: Add at 3.0' (#156) from pycparser into main
Reviewed-on: https://codeberg.org/merelinux/recipes/pulls/156
2 parents 747a7a2 + 4554d47 commit 1b97208

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

recipes/extra/pycparser/recipe.kdl

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
recipe {
2+
name "pycparser"
3+
version "3.0"
4+
release 1
5+
description "A complete parser for the C language, written in pure Python"
6+
url "https://github.com/eliben/pycparser"
7+
licenses "BSD-3-Clause"
8+
archs "aarch64" "x86_64"
9+
depends "busybox" \
10+
"python"
11+
}
12+
13+
source "https://files.pythonhosted.org/packages/source/p/pycparser/pycparser-${recipe.version}.tar.gz" {
14+
blake3 "b48726028171947cededdd5d7606ad249ad5a499f30a11411fb8eb10bdba629c"
15+
}
16+
17+
check {
18+
script r#"
19+
python -c 'from pycparser import c_parser; c_parser.CParser().parse("int main(void) { return 0; }")'
20+
"#
21+
}
22+
23+
install {
24+
script r#"
25+
site_packages="$(python -c 'import sysconfig; print(sysconfig.get_path("purelib", vars={"base": "/usr", "platbase": "/usr"}))')"
26+
install -d "${DESTDIR}${site_packages}"
27+
cp -a pycparser "${DESTDIR}${site_packages}/"
28+
cp -a pycparser.egg-info "${DESTDIR}${site_packages}/"
29+
find "${DESTDIR}" -name "*.pyc" -delete
30+
find "${DESTDIR}" -type d -name __pycache__ -exec rm -rf '{}' +
31+
"#
32+
}
33+
34+
package "pycparser" {
35+
strip false
36+
files "usr/lib/"
37+
}

0 commit comments

Comments
 (0)