summaryrefslogtreecommitdiff
path: root/dev-lang/micropython
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2025-06-13 00:45:35 +0100
committerSam James <sam@gentoo.org>2025-06-13 01:08:32 +0100
commitea02deeec1ffec0e391c400cf458939ebdf41d9c (patch)
tree57ead0bf6911f9bd7de121f29618c1ba036a1cde /dev-lang/micropython
parentf1b3b7d9ccbe07d75eb06700366450fd1f35ac39 (diff)
downloadgentoo-ea02deeec1ffec0e391c400cf458939ebdf41d9c.tar.gz
gentoo-ea02deeec1ffec0e391c400cf458939ebdf41d9c.tar.bz2
gentoo-ea02deeec1ffec0e391c400cf458939ebdf41d9c.zip
dev-lang/micropython: respect python-any-r1 more
The Makefiles call $(PYTHON) in places which defaults to 'python3' and tests have their own variable. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/micropython')
-rw-r--r--dev-lang/micropython/micropython-1.25.0.ebuild24
1 files changed, 16 insertions, 8 deletions
diff --git a/dev-lang/micropython/micropython-1.25.0.ebuild b/dev-lang/micropython/micropython-1.25.0.ebuild
index 2632c621e07e..c6f41ebfd277 100644
--- a/dev-lang/micropython/micropython-1.25.0.ebuild
+++ b/dev-lang/micropython/micropython-1.25.0.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{9..13} )
+PYTHON_COMPAT=( python3_{11..13} )
inherit toolchain-funcs python-any-r1
@@ -17,10 +17,10 @@ KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
-DEPEND="
- dev-libs/libffi:=
- virtual/pkgconfig
+DEPEND="dev-libs/libffi:="
+BDEPEND="
${PYTHON_DEPS}
+ virtual/pkgconfig
"
src_prepare() {
@@ -50,7 +50,7 @@ src_compile() {
einfo ""
einfo "Building the mpy-crosscompiler."
einfo ""
- emake V=1 -C mpy-cross CC="$(tc-getCC)"
+ emake V=1 -C mpy-cross PYTHON="${EPYTHON}" CC="$(tc-getCC)"
# Finally, build the unix port.
einfo ""
@@ -58,15 +58,23 @@ src_compile() {
einfo ""
# Empty `STRIP=` leaves symbols + debug info intact. Let portage handle it.
# https://github.com/micropython/micropython/tree/master/ports/unix/README.md
- emake V=1 -C ports/unix CC="$(tc-getCC)" STRIP=
+ emake V=1 -C ports/unix PYTHON="${EPYTHON}" CC="$(tc-getCC)" STRIP=
}
src_test() {
- emake V=1 -C ports/unix CC="$(tc-getCC)" test
+ emake V=1 -C ports/unix \
+ PYTHON="${EPYTHON}" \
+ MICROPY_CPYTHON3="${EPYTHON}" \
+ CC="$(tc-getCC)" \
+ test
}
src_install() {
- emake V=1 -C ports/unix CC="$(tc-getCC)" DESTDIR="${D}" install
+ emake V=1 -C ports/unix \
+ PYTHON="${EPYTHON}" \
+ CC="$(tc-getCC)" \
+ DESTDIR="${D}" \
+ install
# remove .git files
find tools -type f -name '.git*' -delete || die