public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/micropython/, dev-lang/micropython/files/
@ 2017-11-25 11:51 Patrice Clement
  0 siblings, 0 replies; 3+ messages in thread
From: Patrice Clement @ 2017-11-25 11:51 UTC (permalink / raw
  To: gentoo-commits

commit:     c3fe6df715e7869f381212fec2899587def57f07
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 25 11:48:39 2017 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Sat Nov 25 11:51:05 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3fe6df7

dev-lang/micropython: new package.

The MicroPython project aims to put an implementation of Python 3.x on
microcontrollers and small embedded systems.

Package-Manager: Portage-2.3.13, Repoman-2.3.3

 dev-lang/micropython/Manifest                      |  1 +
 .../micropython-1.9.3-prevent-stripping.patch      | 22 +++++++++
 dev-lang/micropython/metadata.xml                  | 30 ++++++++++++
 dev-lang/micropython/micropython-1.9.3.ebuild      | 54 ++++++++++++++++++++++
 4 files changed, 107 insertions(+)

diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest
new file mode 100644
index 00000000000..5b5ef6cd2f5
--- /dev/null
+++ b/dev-lang/micropython/Manifest
@@ -0,0 +1 @@
+DIST micropython-1.9.3.tar.gz 17311734 BLAKE2B 31ebdedc402af53b205a854aa61b59c694cc893c7f80e4b84196c5d44527545f442628938b7dd923ed9086a79e00ff899682548115224613e888eb8a37dd5ae3 SHA512 1b4358913ed78df66314c9a62636c7b8d086c731459e3bee1fab8695286dc03b6ec7594b2f9b8105e2a6d62190d95c6ad5351fb64c666c1ea54b9535193ee8a8

diff --git a/dev-lang/micropython/files/micropython-1.9.3-prevent-stripping.patch b/dev-lang/micropython/files/micropython-1.9.3-prevent-stripping.patch
new file mode 100644
index 00000000000..5ae7299f9f9
--- /dev/null
+++ b/dev-lang/micropython/files/micropython-1.9.3-prevent-stripping.patch
@@ -0,0 +1,22 @@
+--- a/py/mkenv.mk	2017-11-25 09:52:30.921836372 +0000
++++ a/py/mkenv.mk	2017-11-25 09:52:35.257861233 +0000
+@@ -50,7 +50,6 @@
+ LD = $(CROSS_COMPILE)ld
+ OBJCOPY = $(CROSS_COMPILE)objcopy
+ SIZE = $(CROSS_COMPILE)size
+-STRIP = $(CROSS_COMPILE)strip
+ AR = $(CROSS_COMPILE)ar
+ ifeq ($(MICROPY_FORCE_32BIT),1)
+ CC += -m32
+--- a/py/mkrules.mk	2017-11-25 09:53:13.107078063 +0000
++++ a/py/mkrules.mk	2017-11-25 09:53:31.898185592 +0000
+@@ -132,9 +132,6 @@
+ # Do not pass COPT here - it's *C* compiler optimizations. For example,
+ # we may want to compile using Thumb, but link with non-Thumb libc.
+ 	$(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS)
+-ifndef DEBUG
+-	$(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG)
+-endif
+ 	$(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $(PROG)
+ 
+ clean: clean-prog

diff --git a/dev-lang/micropython/metadata.xml b/dev-lang/micropython/metadata.xml
new file mode 100644
index 00000000000..e644fcc0141
--- /dev/null
+++ b/dev-lang/micropython/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>monsieurp@gentoo.org</email>
+		<name>Patrice Clement</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>python@gentoo.org</email>
+		<name>Python</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">micropython/micropython</remote-id>
+	</upstream>
+	<longdescription lang="en">
+The MicroPython project aims to put an implementation of Python 3.x on
+microcontrollers and small embedded systems.
+MicroPython implements the entire Python 3.4 syntax (including exceptions,
+with, yield from, etc., and additionally async/await keywords from Python 3.5).
+The following core datatypes are provided: str (including basic Unicode
+support), bytes, bytearray, tuple, list, dict, set, frozenset, array.array,
+collections.namedtuple, classes and instances. Builtin modules include sys,
+time, and struct, etc. Select ports have support for _thread module
+(multithreading). Note that only a subset of Python 3 functionality is
+implemented for the data types and modules.
+MicroPython can execute scripts in textual source form or from precompiled
+bytecode, in both cases either from an on-device filesystem or "frozen" into
+the MicroPython executable.
+	</longdescription>
+</pkgmetadata>

diff --git a/dev-lang/micropython/micropython-1.9.3.ebuild b/dev-lang/micropython/micropython-1.9.3.ebuild
new file mode 100644
index 00000000000..672087758df
--- /dev/null
+++ b/dev-lang/micropython/micropython-1.9.3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Python implementation for microcontrollers"
+HOMEPAGE="https://github.com/micropython/micropython"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+
+DEPEND="
+	virtual/libffi
+	virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${P}-prevent-stripping.patch" )
+
+src_compile() {
+	cd ports/unix || die
+
+	# 1) don't die on compiler warnings
+	# 2) remove /usr/local prefix references in favour of /usr
+	sed -i \
+		-e 's#-Werror##g;' \
+		-e 's#\/usr\/local#\/usr#g;' \
+		Makefile || die
+	emake CC="$(tc-getCC)" axtls
+	emake CC="$(tc-getCC)"
+}
+
+src_test() {
+	# XXX: find out why these tests fail
+	rm -v tests/misc/recursive_iternext* || die
+
+	cd ports/unix || die
+	emake test
+}
+
+src_install() {
+	pushd ports/unix > /dev/null || die
+	emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" DESTDIR="${D}" install
+	popd > /dev/null || die
+
+	# remove .git files
+	find tools -type f -name '.git*' -exec rm {} \; || die
+
+	dodoc -r tools
+	einstalldocs
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/micropython/, dev-lang/micropython/files/
@ 2019-11-27 22:48 Patrice Clement
  0 siblings, 0 replies; 3+ messages in thread
From: Patrice Clement @ 2019-11-27 22:48 UTC (permalink / raw
  To: gentoo-commits

commit:     c262bf1a925bea1d43a1731722bdb21861086f2e
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 27 22:41:50 2019 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Nov 27 22:45:05 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c262bf1a

dev-lang/micropython: version bump.

Courtesy of Mike Auty <ikelos <AT> gentoo.org>.

Closes: https://bugs.gentoo.org/700362
Package-Manager: Portage-2.3.79, Repoman-2.3.16
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 dev-lang/micropython/Manifest                      |  1 +
 .../files/micropython-1.11-prevent-stripping.patch | 26 +++++++++++
 dev-lang/micropython/micropython-1.11.ebuild       | 52 ++++++++++++++++++++++
 3 files changed, 79 insertions(+)

diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest
index 0b69931fbe1..688bf57b4ed 100644
--- a/dev-lang/micropython/Manifest
+++ b/dev-lang/micropython/Manifest
@@ -1,2 +1,3 @@
+DIST micropython-1.11.tar.gz 23010708 BLAKE2B 8deb29f2a27b8299f62c8c3d332654889e610ddc6854dc38c6cf7504c89f2f9cbbacccdc2d8e471d96b8bb28bbb920fe7ec1b8fd49b14209924262f54687c3c1 SHA512 255860e56bf51c4f35a00cf66fff3ee37fbef1e0d674af6ed580367d8b3d2d60fb88609a675e8f322fd466a23006e38078b67edd6f306e639d6be12abb2972d2
 DIST micropython-1.9.3.tar.gz 17311734 BLAKE2B 31ebdedc402af53b205a854aa61b59c694cc893c7f80e4b84196c5d44527545f442628938b7dd923ed9086a79e00ff899682548115224613e888eb8a37dd5ae3 SHA512 1b4358913ed78df66314c9a62636c7b8d086c731459e3bee1fab8695286dc03b6ec7594b2f9b8105e2a6d62190d95c6ad5351fb64c666c1ea54b9535193ee8a8
 DIST micropython-1.9.4.tar.gz 18957648 BLAKE2B bc4dc4ef6623adbda64c9e03137860a7b9ce7d2d181434cb993438752ec39a4ea7cf7cf7a14736c57bdc2ea9c3f856b0dbe2d92fc0e1cbef99112427583ad665 SHA512 9995c983c93fb1280e60d7c52a10930a6a3de8d589a0f4264a9a4a4fede7c37e27ed4871c4c9092aec3fb33028064beb8c5eb19b7956e8f0c5d3b2a82ffa9932

diff --git a/dev-lang/micropython/files/micropython-1.11-prevent-stripping.patch b/dev-lang/micropython/files/micropython-1.11-prevent-stripping.patch
new file mode 100644
index 00000000000..7b78b6fb9f6
--- /dev/null
+++ b/dev-lang/micropython/files/micropython-1.11-prevent-stripping.patch
@@ -0,0 +1,26 @@
+diff --git a/py/mkenv.mk b/py/mkenv.mk
+index 46eedf9..2f3f3ca 100644
+--- a/py/mkenv.mk
++++ b/py/mkenv.mk
+@@ -52,7 +52,6 @@ CXX = $(CROSS_COMPILE)g++
+ LD = $(CROSS_COMPILE)ld
+ OBJCOPY = $(CROSS_COMPILE)objcopy
+ SIZE = $(CROSS_COMPILE)size
+-STRIP = $(CROSS_COMPILE)strip
+ AR = $(CROSS_COMPILE)ar
+ ifeq ($(MICROPY_FORCE_32BIT),1)
+ CC += -m32
+diff --git a/py/mkrules.mk b/py/mkrules.mk
+index 4e4fdef..149b337 100644
+--- a/py/mkrules.mk
++++ b/py/mkrules.mk
+@@ -133,9 +133,6 @@ $(PROG): $(OBJ)
+ # Do not pass COPT here - it's *C* compiler optimizations. For example,
+ # we may want to compile using Thumb, but link with non-Thumb libc.
+ 	$(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS)
+-ifndef DEBUG
+-	$(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG)
+-endif
+ 	$(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $(PROG)
+ 
+ clean: clean-prog

diff --git a/dev-lang/micropython/micropython-1.11.ebuild b/dev-lang/micropython/micropython-1.11.ebuild
new file mode 100644
index 00000000000..d1f7d57db77
--- /dev/null
+++ b/dev-lang/micropython/micropython-1.11.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Python implementation for microcontrollers"
+HOMEPAGE="https://github.com/micropython/micropython"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+
+DEPEND="
+	virtual/libffi
+	virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${P}-prevent-stripping.patch" )
+
+src_compile() {
+	cd ports/unix || die
+
+	# 1) don't die on compiler warnings
+	# 2) remove /usr/local prefix references in favour of /usr
+	sed -i \
+		-e 's#-Werror##g;' \
+		-e 's#\/usr\/local#\/usr#g;' \
+		Makefile || die
+
+	emake CC="$(tc-getCC)" axtls
+	emake CC="$(tc-getCC)"
+}
+
+src_test() {
+	cd ports/unix || die
+	emake test
+}
+
+src_install() {
+	pushd ports/unix > /dev/null || die
+	emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" DESTDIR="${D}" install
+	popd > /dev/null || die
+
+	# remove .git files
+	find tools -type f -name '.git*' -exec rm {} \; || die
+
+	dodoc -r tools
+	einstalldocs
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/micropython/, dev-lang/micropython/files/
@ 2020-06-09 13:14 Patrice Clement
  0 siblings, 0 replies; 3+ messages in thread
From: Patrice Clement @ 2020-06-09 13:14 UTC (permalink / raw
  To: gentoo-commits

commit:     2e59bd3af6564e8e862ba14a9c2b4088979cb04f
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  9 13:13:32 2020 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue Jun  9 13:13:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e59bd3a

dev-lang/micropython: restore tests.

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 .../files/micropython-1.11-exclude-float-parse-tests.patch   | 12 ++++++++++++
 dev-lang/micropython/micropython-1.11.ebuild                 |  9 ++++-----
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/dev-lang/micropython/files/micropython-1.11-exclude-float-parse-tests.patch b/dev-lang/micropython/files/micropython-1.11-exclude-float-parse-tests.patch
new file mode 100644
index 00000000000..6d81661790e
--- /dev/null
+++ b/dev-lang/micropython/files/micropython-1.11-exclude-float-parse-tests.patch
@@ -0,0 +1,12 @@
+--- a/tests/run-tests	2020-06-09 13:09:24.239121947 -0000
++++ b/tests/run-tests	2020-06-09 13:09:57.315476363 -0000
+@@ -377,6 +377,9 @@
+         skip_tests.add('micropython/heapalloc_traceback.py') # because native doesn't have proper traceback info
+         skip_tests.add('micropython/schedule.py') # native code doesn't check pending events
+ 
++    skip_tests.add('float/float_parse.py')
++    skip_tests.add('float/float_parse_doubleprec.py')
++    # these two tests fail for some reason.
+     for test_file in tests:
+         test_file = test_file.replace('\\', '/')
+ 

diff --git a/dev-lang/micropython/micropython-1.11.ebuild b/dev-lang/micropython/micropython-1.11.ebuild
index 94d80d97d92..bdf54e45b9e 100644
--- a/dev-lang/micropython/micropython-1.11.ebuild
+++ b/dev-lang/micropython/micropython-1.11.ebuild
@@ -19,11 +19,10 @@ DEPEND="
 	virtual/libffi
 	virtual/pkgconfig"
 
-PATCHES=( "${FILESDIR}/${P}-prevent-stripping.patch" )
-
-# A few tests fail after enforcing CFLAGS/LDFLAGS.
-# We need to work out why.
-RESTRICT="test"
+PATCHES=(
+	"${FILESDIR}/${P}-prevent-stripping.patch"
+	"${FILESDIR}/${P}-exclude-float-parse-tests.patch"
+)
 
 src_prepare() {
 	default


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-09 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-09 13:14 [gentoo-commits] repo/gentoo:master commit in: dev-lang/micropython/, dev-lang/micropython/files/ Patrice Clement
  -- strict thread matches above, loose matches on Subject: below --
2019-11-27 22:48 Patrice Clement
2017-11-25 11:51 Patrice Clement

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox