From unknown Sun Aug 17 02:00:04 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#34571] [PATCH] Add micropython Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Feb 2019 09:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34571 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34571@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155056816422660 (code B ref -1); Tue, 19 Feb 2019 09:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Feb 2019 09:22:44 +0000 Received: from localhost ([127.0.0.1]:53886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw1bu-0005tO-LM for submit@debbugs.gnu.org; Tue, 19 Feb 2019 04:22:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw1bs-0005tB-F3 for submit@debbugs.gnu.org; Tue, 19 Feb 2019 04:22:40 -0500 Received: from lists.gnu.org ([209.51.188.17]:52130) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gw1bf-00048H-J6 for submit@debbugs.gnu.org; Tue, 19 Feb 2019 04:22:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gw1be-0008G5-GP for guix-patches@gnu.org; Tue, 19 Feb 2019 04:22:27 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gw1bc-00047C-7A for guix-patches@gnu.org; Tue, 19 Feb 2019 04:22:26 -0500 Received: from flashner.co.il ([178.62.234.194]:44122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gw1ba-00046S-6y for guix-patches@gnu.org; Tue, 19 Feb 2019 04:22:22 -0500 Received: from localhost (unknown [188.120.128.87]) by flashner.co.il (Postfix) with ESMTPSA id 9E66340047 for ; Tue, 19 Feb 2019 09:22:17 +0000 (UTC) Date: Tue, 19 Feb 2019 11:22:16 +0200 From: Efraim Flashner Message-ID: <20190219092216.GA32103@macbook41> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tjCHc7DPkfUGtrlw" Content-Disposition: inline X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 User-Agent: Mutt/1.11.2 (2019-01-07) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 178.62.234.194 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --tjCHc7DPkfUGtrlw Content-Type: multipart/mixed; boundary="YiEDa0DAkWCtVeE4" Content-Disposition: inline --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I was looking around to see if there was an alternate perl implementation and I ended up packaging micropython. I have no preference between it being in python.scm or embedded.scm --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-Add-micropython.patch" Content-Transfer-Encoding: quoted-printable =46rom fef607e04b951e7a893139f9afd0a0df3a2b8a52 Mon Sep 17 00:00:00 2001 =46rom: Efraim Flashner Date: Tue, 19 Feb 2019 11:20:02 +0200 Subject: [PATCH] gnu: Add micropython. * gnu/packages/python.scm (micropython): New variable. --- gnu/packages/python.scm | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 1c4ea720f..e5beac2ec 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -459,3 +459,49 @@ instead of @command{python3}."))) =20 (define-public python-wrapper (wrap-python3 python)) (define-public python-minimal-wrapper (wrap-python3 python-minimal)) + +(define-public micropython + (package + (name "micropython") + (version "1.10") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/micropython/micropython/" + "releases/download/v" version + "/micropython-" version ".tar.gz")) + (sha256 + (base32 + "1g1zjip3rkx6bp16qi1bag72wivnbh56fcsl3nffanrx4j5f4z90")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before 'build 'preprare-build + (lambda _ + (chdir "ports/unix") + ;; see: https://github.com/micropython/micropython/pull/4246 + (substitute* "Makefile" + (("-Os") "-Os -ffp-contract=3Doff")) + #t)) + (delete 'configure)) ; no configure + #:make-flags (list (string-append "PREFIX=3D" (assoc-ref %outputs "= out")) + "V=3D1") + #:test-target "test")) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python" ,python-minimal-wrapper))) + (inputs + `(("libffi" ,libffi))) + (home-page "https://micropython.org/") + (synopsis "Python implementation for microcontrollers and constrained = systems") + (description "MicroPython is a lean and efficient implementation of the +Python 3 programming language that includes a small subset of the Python +standard library and is optimised to run on microcontrollers and in constr= ained +environments. MicroPython is packed full of advanced features such as an +interactive prompt, arbitrary precision integers, closures, list comprehen= sion, +generators, exception handling and more. Still it is compact enough to fi= t and +run within just 256k of code space and 16k of RAM. MicroPython aims to be= as +compatible with normal Python as possible to allow you to transfer code wi= th +ease from the desktop to a microcontroller or embedded system.") + (license license:expat))) --=20 2.20.1 --YiEDa0DAkWCtVeE4-- --tjCHc7DPkfUGtrlw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlxrysgACgkQQarn3Mo9 g1Gz2BAAvmv6E26ZEabwp9hArKBYL8srH/EDGck1i1bwNwsgDNn8Y8WsJ/p4fLez sbHC2WoI3z0OY4SWlZR8oH9Qb4xyRUlR3ewuxtiFJXbRaTpqwIZQUKe1Fq6ByEH7 TrALITWaafVJBGXL5I44zqMVCimTwIarMb6vXvGz64ZHQu67WCB6uyKgMxQpk48H d8cBQZopPZ2sxrQr0CXI4IvYu8H8Uxd3KcyCJ4EYWb3AvPxw8ECTAfwLarg1CSxE 859DgpKMcmS9QNv63pbDiYfwx/AQ+oKkWOR1dT1frb4PCZnCm3g9WHhgc0A0tIcG v6y+iFPAzFq0/TZQZnZVDK9fDk9jCNI7ytJQD9xAlzI+dc4lMCxbTblI+32dYLSY 8pTR3fx42eCzp8Txx1VIS7mFP9Z1XEEWnX7pF14TcwKo33SGP+a7ybZp42dzdnuu HKcYQBXhmjxCjphQWuK3I2hL4x9m+rBYZZEYsIBV0FNdHNoOePlVmFoEwBX8dLpG wnptDttyJnY46eO8UUCsCOzsQpbUah04f8pLzqnejAwVjgsMuIRG3CCgHybn0C53 nXKk6L1YtKXLWgqLdgDFOfp7VbEsGkJVJw/WurvPnL9PQ5wwUb2BKUNeellCjKZu DXlt0N5rcFMMj6LF2r9Zp+7rc7kimNe+HBACgoaqeVlTXxleTo4= =7RID -----END PGP SIGNATURE----- --tjCHc7DPkfUGtrlw-- From unknown Sun Aug 17 02:00:04 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#34571] [PATCH] Add micropython Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Feb 2019 09:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34571 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Efraim Flashner Cc: 34571@debbugs.gnu.org Received: via spool by 34571-submit@debbugs.gnu.org id=B34571.155056961024863 (code B ref 34571); Tue, 19 Feb 2019 09:47:01 +0000 Received: (at 34571) by debbugs.gnu.org; 19 Feb 2019 09:46:50 +0000 Received: from localhost ([127.0.0.1]:53908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw1zF-0006Sx-WB for submit@debbugs.gnu.org; Tue, 19 Feb 2019 04:46:50 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:47474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw1zD-0006So-PY for 34571@debbugs.gnu.org; Tue, 19 Feb 2019 04:46:48 -0500 Received: from localhost (178.113.229.202.wireless.dyn.drei.com [178.113.229.202]) by dd26836.kasserver.com (Postfix) with ESMTPSA id BC8B133613F5; Tue, 19 Feb 2019 10:46:45 +0100 (CET) Date: Tue, 19 Feb 2019 10:46:40 +0100 From: Danny Milosavljevic Message-ID: <20190219104640.631a3ba8@scratchpost.org> In-Reply-To: <20190219092216.GA32103@macbook41> References: <20190219092216.GA32103@macbook41> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/YuP+L+dnRU5YhnZ4mukoZdf"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/YuP+L+dnRU5YhnZ4mukoZdf Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Erfraim, On Tue, 19 Feb 2019 11:22:16 +0200 Efraim Flashner wrote: > I was looking around to see if there was an alternate perl > implementation and I ended up packaging micropython. I have no > preference between it being in python.scm or embedded.scm Heh :) There's a bundled version of FreeRTOS in ./ports/cc3200 which is GPLv2 with a modification. In this case, I suggest to delete FreeRTOS since we don't use it anyway--and if we ever wanted to, we'd not use the bundled version. So in a sense I suggest to unbundle it. We could also just add GPLv2 with exception to the license list, but in this case I wouldn't--since it doesn't really apply to the installed version and we don't use it anyhow. Also, there's a bundled copy of libffi in lib. Usually, I delete it to make sure it's not picked up by accident. Otherwise LGTM! --Sig_/YuP+L+dnRU5YhnZ4mukoZdf Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlxr0IAACgkQ5xo1VCww uqXgeAf8CYa6Ns/lrAdzAUXC3wzy8zp7iOlVPkPt54di3N9JyVX1SBjZU5PpAj1E BfW40QTZp6jae9d22MI/ynwwQF5VGDSlqgnvhtcD1rQ4InfAwYPODHNJjyT7InGv qlHwWxUU3xjpsndrGvCiV79Cpo6We15cHfQdkZHlm/dqtHxnS35kscWqQHhMvMmT i5fOlDMZz1eone5V7DU9Nmxheta56uQFX36lim2mD5xgW1iexFHhZHTFjQCd9bbI 8NK+wS8sQtEsaJcU40YjiPcc9bt6NmG+dH1l08tk1UQuXDBtZk28P8AjuxUQCFiM 7nNXitd4HyHIULsDcnBfD6XBrMSBoQ== =T3I4 -----END PGP SIGNATURE----- --Sig_/YuP+L+dnRU5YhnZ4mukoZdf-- From unknown Sun Aug 17 02:00:04 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#34571] [PATCH] Add micropython Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Feb 2019 10:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34571 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: 34571@debbugs.gnu.org Received: via spool by 34571-submit@debbugs.gnu.org id=B34571.155057107127020 (code B ref 34571); Tue, 19 Feb 2019 10:12:02 +0000 Received: (at 34571) by debbugs.gnu.org; 19 Feb 2019 10:11:11 +0000 Received: from localhost ([127.0.0.1]:53929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw2Mp-00071k-JA for submit@debbugs.gnu.org; Tue, 19 Feb 2019 05:11:11 -0500 Received: from flashner.co.il ([178.62.234.194]:33244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw2Mk-00071B-JY for 34571@debbugs.gnu.org; Tue, 19 Feb 2019 05:11:07 -0500 Received: from localhost (unknown [188.120.128.87]) by flashner.co.il (Postfix) with ESMTPSA id 6F88040047; Tue, 19 Feb 2019 10:11:00 +0000 (UTC) Date: Tue, 19 Feb 2019 12:10:59 +0200 From: Efraim Flashner Message-ID: <20190219101059.GB32103@macbook41> References: <20190219092216.GA32103@macbook41> <20190219104640.631a3ba8@scratchpost.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lCAWRPmW1mITcIfM" Content-Disposition: inline In-Reply-To: <20190219104640.631a3ba8@scratchpost.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 User-Agent: Mutt/1.11.2 (2019-01-07) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --lCAWRPmW1mITcIfM Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 19, 2019 at 10:46:40AM +0100, Danny Milosavljevic wrote: > Hi Erfraim, >=20 > On Tue, 19 Feb 2019 11:22:16 +0200 > Efraim Flashner wrote: >=20 > > I was looking around to see if there was an alternate perl > > implementation and I ended up packaging micropython. I have no > > preference between it being in python.scm or embedded.scm >=20 > Heh :) >=20 > There's a bundled version of FreeRTOS in ./ports/cc3200 which is GPLv2 > with a modification. >=20 > In this case, I suggest to delete FreeRTOS since we don't use it > anyway--and if we ever wanted to, we'd not use the bundled version. > So in a sense I suggest to unbundle it. >=20 > We could also just add GPLv2 with exception to the license list, > but in this case I wouldn't--since it doesn't really apply to the > installed version and we don't use it anyhow. I'll go ahead and remove it. >=20 > Also, there's a bundled copy of libffi in lib. Usually, I delete > it to make sure it's not picked up by accident. >=20 Looking at the .gitmodules=C2=B9 it looks like there's a number of bundled librarires in the lib folder. With all of them removed it no longer builds. Looks like I need to take another look at it. I also switched python-minimal-wrapper -> python-wrapper =C2=B9 https://github.com/micropython/micropython/blob/v1.10/.gitmodules --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --lCAWRPmW1mITcIfM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlxr1i8ACgkQQarn3Mo9 g1FxRQ//VU8vrZQT/8Hka+aqnsdQIKMgyDYDle8Q8EazpkTftrl9DgTNe+8F7VoW P1HxdaxTLGbWVh3zf0U3mi6kWa3/+7sSOJf2AuJ9lysNpVCA9HjVr0S4SpZQdZ62 PD6wEfdqIHXyGS9g6W0VwBxD0t6lHvQbQbX+LIyM2xJN1y6XOskb1xpYWd+smBx3 cuneoVhkejnojlOCNQV+HPWFuDPlJV8ZAigUTrOHfhULH1A8yBV5zoj79YLNP+9r i7ZvECuTpFM2DXfF4X2EcfaszchlrR9HWXnW/ESPqWqBiOQnrleplNEFv7S15HsY a8H9VYdsYUgL4EOUBrWWNDz5bXwYxqP1Booe1p3UB8oOIK9RM3ZjFRZrCzI/bFlZ t7QXFYHEOMBtgDxtkdR8XZmhBDMNcqVuKQifcrgVOVeNhmmPLS4Xv//dEoY70B3l X+uc0Wze7v1tdnqfqRjznkZ3uadDVA+5OmUMCRYvfPGPmZsdrRsCW9baE0P/Wv97 J2uvDgtrRfsmBLWD0UTz7/jE95ghFu2oKaD1GVIwFalTV2j0akP+uoKpt5B2ZT7j uoiBo88bia4iSqDzT/Gb6RhcOpwb/1TR6WXdT6kG/pMC+Mw+zFZ5Ufa2+1wSMzwj yT0UCQRAaTfdhH3fdGdgu2Y5Wf4Ag6L/WWaVGF5vfZK7eCpYBXU= =72Ou -----END PGP SIGNATURE----- --lCAWRPmW1mITcIfM-- From unknown Sun Aug 17 02:00:04 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#34571] [PATCH] Add micropython Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Feb 2019 10:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34571 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: 34571@debbugs.gnu.org Received: via spool by 34571-submit@debbugs.gnu.org id=B34571.155057263429350 (code B ref 34571); Tue, 19 Feb 2019 10:38:02 +0000 Received: (at 34571) by debbugs.gnu.org; 19 Feb 2019 10:37:14 +0000 Received: from localhost ([127.0.0.1]:53935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw2m1-0007dK-P5 for submit@debbugs.gnu.org; Tue, 19 Feb 2019 05:37:14 -0500 Received: from flashner.co.il ([178.62.234.194]:33302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw2m0-0007d7-3z for 34571@debbugs.gnu.org; Tue, 19 Feb 2019 05:37:12 -0500 Received: from localhost (unknown [188.120.128.87]) by flashner.co.il (Postfix) with ESMTPSA id 8ABF540061; Tue, 19 Feb 2019 10:37:05 +0000 (UTC) Date: Tue, 19 Feb 2019 12:37:04 +0200 From: Efraim Flashner Message-ID: <20190219103704.GC32103@macbook41> References: <20190219092216.GA32103@macbook41> <20190219104640.631a3ba8@scratchpost.org> <20190219101059.GB32103@macbook41> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0QFb0wBpEddLcDHQ" Content-Disposition: inline In-Reply-To: <20190219101059.GB32103@macbook41> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 User-Agent: Mutt/1.11.2 (2019-01-07) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0QFb0wBpEddLcDHQ Content-Type: multipart/mixed; boundary="FFoLq8A0u+X9iRU8" Content-Disposition: inline --FFoLq8A0u+X9iRU8 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 19, 2019 at 12:10:59PM +0200, Efraim Flashner wrote: > On Tue, Feb 19, 2019 at 10:46:40AM +0100, Danny Milosavljevic wrote: > > Hi Erfraim, > >=20 > > On Tue, 19 Feb 2019 11:22:16 +0200 > > Efraim Flashner wrote: > >=20 > > > I was looking around to see if there was an alternate perl > > > implementation and I ended up packaging micropython. I have no > > > preference between it being in python.scm or embedded.scm > >=20 > > Heh :) > >=20 > > There's a bundled version of FreeRTOS in ./ports/cc3200 which is GPLv2 > > with a modification. > >=20 > > In this case, I suggest to delete FreeRTOS since we don't use it > > anyway--and if we ever wanted to, we'd not use the bundled version. > > So in a sense I suggest to unbundle it. > >=20 > > We could also just add GPLv2 with exception to the license list, > > but in this case I wouldn't--since it doesn't really apply to the > > installed version and we don't use it anyhow. >=20 > I'll go ahead and remove it. >=20 > >=20 > > Also, there's a bundled copy of libffi in lib. Usually, I delete > > it to make sure it's not picked up by accident. > >=20 > Looking at the .gitmodules=C2=B9 it looks like there's a number of bundled > librarires in the lib folder. With all of them removed it no longer > builds. Looks like I need to take another look at it. >=20 > I also switched python-minimal-wrapper -> python-wrapper >=20 > =C2=B9 https://github.com/micropython/micropython/blob/v1.10/.gitmodules >=20 I have a new version attached --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --FFoLq8A0u+X9iRU8 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-Add-micropython.patch" Content-Transfer-Encoding: quoted-printable =46rom a8cc300d4d2ae55554ac29a840357b775105ed29 Mon Sep 17 00:00:00 2001 =46rom: Efraim Flashner Date: Tue, 19 Feb 2019 11:20:02 +0200 Subject: [PATCH] gnu: Add micropython. * gnu/packages/python.scm (micropython): New variable. --- gnu/packages/python.scm | 62 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 1c4ea720f..25f2ffa73 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -459,3 +459,65 @@ instead of @command{python3}."))) =20 (define-public python-wrapper (wrap-python3 python)) (define-public python-minimal-wrapper (wrap-python3 python-minimal)) + +(define-public micropython + (package + (name "micropython") + (version "1.10") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/micropython/micropython/" + "releases/download/v" version + "/micropython-" version ".tar.gz")) + (sha256 + (base32 + "1g1zjip3rkx6bp16qi1bag72wivnbh56fcsl3nffanrx4j5f4z90")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "ports/cc3200/FreeRTOS") + (with-directory-excursion "lib" + ;; TODO: Unbundle axtls and berkley-db-1.xx + (for-each delete-file-recursively + '("libffi" "lwip" "stm32lib" "nrfx"))) + #t)))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'build 'preprare-build + (lambda _ + (chdir "ports/unix") + ;; see: https://github.com/micropython/micropython/pull/4246 + (substitute* "Makefile" + (("-Os") "-Os -ffp-contract=3Doff")) + #t)) + (replace 'install-license-files + ;; We don't build in the root directory so the file isn't found. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (dest (string-append out "/share/doc/" ,name "-" ,vers= ion "/"))) + (install-file "../../LICENSE" dest)) + #t)) + (delete 'configure)) ; no configure + #:make-flags (list (string-append "PREFIX=3D" (assoc-ref %outputs "= out")) + "V=3D1") + #:test-target "test")) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python" ,python-wrapper))) + (inputs + `(("libffi" ,libffi))) + (home-page "https://micropython.org/") + (synopsis "Python implementation for microcontrollers and constrained = systems") + (description "MicroPython is a lean and efficient implementation of the +Python 3 programming language that includes a small subset of the Python +standard library and is optimised to run on microcontrollers and in constr= ained +environments. MicroPython is packed full of advanced features such as an +interactive prompt, arbitrary precision integers, closures, list comprehen= sion, +generators, exception handling and more. Still it is compact enough to fi= t and +run within just 256k of code space and 16k of RAM. MicroPython aims to be= as +compatible with normal Python as possible to allow you to transfer code wi= th +ease from the desktop to a microcontroller or embedded system.") + (license license:expat))) --=20 2.20.1 --FFoLq8A0u+X9iRU8-- --0QFb0wBpEddLcDHQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlxr3E8ACgkQQarn3Mo9 g1GdEg/+JF9F9pVczfhyaiM3bZcnBhgGE+iQTkoucq1Y6cc4jpHDzBzU2XyDYZwo pbEf6UO91eKErViKYUNIEAMYSAP98qGHmqS7WrGQRy/cErmLKFxU92K+/xUaEnhr 8othwDRGozeZIbuxKAxmX1pJovJRY4G1JaUH10inEItpC1C+j8R3ag8jkQGHMTto woR1zOTu2UKCCLN7M6PPsEeP/Wu4E7pUJ5Il9p+L2/t5BvE3Y/OJrPMadu0JtsQJ dz5rm0q9LmxIsVfXSXAXuaLb1eCSAOuPOP/VxqKHAmr68wJYG63tqEZLmS7ZAyIL rFT7TJP4W8p/djYXC4IdOc01RMofe5WISRmvcyu0lN0UqQPxrf6IeGMCApyEBmOf bGrEEFyrtLx+a7lPUxE1KCWiubav8KUTXIpIcrd9n+TjQSu1NJpwU1OnhpkPmcIg FVgfIHcqAmvYdhxhWCTCZ8wyqD5csHd6xwTP4re/AGdhq4sVZifx0mx+TIMervOe pRz2Fc02q1B6u4TLU35h0ouIYh4rPny/o1hRTRU4u5vS1hymtyqX4OqZnN86otwZ xuSZ3ghsMa0JLlbhNYlN0BZ7FOA6eLhbgBMdkrgxzw+FudJbCWuS5haDS4J/+uOl juhJ+hSs01Mzkp1D9Nm84osByVrwiz/2nYdCEUys9Jwf5JJikAY= =/H5s -----END PGP SIGNATURE----- --0QFb0wBpEddLcDHQ-- From unknown Sun Aug 17 02:00:04 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#34571] [PATCH] Add micropython Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Feb 2019 13:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34571 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Efraim Flashner Cc: 34571@debbugs.gnu.org Received: via spool by 34571-submit@debbugs.gnu.org id=B34571.155058138318456 (code B ref 34571); Tue, 19 Feb 2019 13:04:01 +0000 Received: (at 34571) by debbugs.gnu.org; 19 Feb 2019 13:03:03 +0000 Received: from localhost ([127.0.0.1]:53977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw539-0004nc-FN for submit@debbugs.gnu.org; Tue, 19 Feb 2019 08:03:03 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw534-0004n9-H6 for 34571@debbugs.gnu.org; Tue, 19 Feb 2019 08:02:59 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1550581366; cv=none; d=zoho.com; s=zohoarc; b=cmniODzBbBGBUdeaYJr5MsGmRYKnopayDarFM0I3admSr5fyDQKcof1e4hrMlljqsPaWuXDO/mmE+8cPcJMZso+IfWQ8I+RKqvGcYxz3v2wMiA+Vs9CcR8pJUitMEVbm0T8vck+GYKe5cs55+GzEHdvYDr0vWa2LeWFmAc7p2M0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1550581366; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=qV+t0+/D5etXE5/4AqKME+fBpw91WLe+4UrUb27eFlI=; b=Ic84tzTivNJW+nYMot6jPi+khdMZIPjjX7XtjEWyPJeOysJkuM605Q8WsMStNwpIQ28oQR2Eblzq/4J3N2NmlozZF4W2ldmhtxmg6G3n3osZqeJgH+Fl6gODxdRo1xWNw+kHpO5Xp5GOpyzUG/fmT+dbPZvKq5But55rV34zO1E= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1550581366; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; l=1037; bh=qV+t0+/D5etXE5/4AqKME+fBpw91WLe+4UrUb27eFlI=; b=hG2TKjjQn85WBLKC/QdY2UIe+YjY/4avv/918VEFLlQZsMbWk7fnN6WH8hky5TbV EeOgu4BZ6iUgtDJb8vs2+HbVm/AKjR21wgau9M16ijBrMd+hY6ov3k9eSn9SB0ZsL5H 5+mr/LOIpc+dOLdRQZI1rXhNJ4fsmKkqdqrngtaA= Received: from localhost (141.80.238.36 [141.80.238.36]) by mx.zohomail.com with SMTPS id 1550581366170264.3139182072424; Tue, 19 Feb 2019 05:02:46 -0800 (PST) References: <20190219092216.GA32103@macbook41> User-agent: mu4e 1.0; emacs 26.1 From: Ricardo Wurmus In-reply-to: <20190219092216.GA32103@macbook41> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Tue, 19 Feb 2019 14:02:36 +0100 Message-ID: <87r2c4ue1f.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Efraim Flashner writes: > I was looking around to see if there was an alternate perl > implementation and I ended up packaging micropython. I have no > preference between it being in python.scm or embedded.scm =E2=80=9Cpython.scm=E2=80=9D seems fine. > + (add-before 'build 'preprare-build Typo: preprare =E2=80=93> prepare > + (lambda _ > + (chdir "ports/unix") > + ;; see: https://github.com/micropython/micropython/pull/4246 > + (substitute* "Makefile" > + (("-Os") "-Os -ffp-contract=3Doff")) > + #t)) > + (delete 'configure)) ; no configure > + #:make-flags (list (string-append "PREFIX=3D" (assoc-ref %outputs= "out")) > + "V=3D1") > + #:test-target "test")) > + (native-inputs > + `(("pkg-config" ,pkg-config) > + ("python" ,python-minimal-wrapper))) Oh, this Python needs Python=E2=80=A6? I think you should be using python-wrapper here as the python-minimal variants are merely supposed to be used for breaking a cycle in the build of Python itself. -- Ricardo From unknown Sun Aug 17 02:00:04 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Efraim Flashner Subject: bug#34571: closed (Re: [bug#34571] [PATCH] Add micropython) Message-ID: References: <20190220071051.GB2177@macbook41> <20190219092216.GA32103@macbook41> X-Gnu-PR-Message: they-closed 34571 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 34571@debbugs.gnu.org Date: Wed, 20 Feb 2019 07:11:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1550646662-4194-1" This is a multi-part message in MIME format... ------------=_1550646662-4194-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #34571: [PATCH] Add micropython which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 34571@debbugs.gnu.org. --=20 34571: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D34571 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1550646662-4194-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 34571-done) by debbugs.gnu.org; 20 Feb 2019 07:11:00 +0000 Received: from localhost ([127.0.0.1]:57115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gwM20-00015Q-28 for submit@debbugs.gnu.org; Wed, 20 Feb 2019 02:11:00 -0500 Received: from flashner.co.il ([178.62.234.194]:35750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gwM1y-00015D-IV for 34571-done@debbugs.gnu.org; Wed, 20 Feb 2019 02:10:58 -0500 Received: from localhost (unknown [188.120.128.87]) by flashner.co.il (Postfix) with ESMTPSA id 03B0340061 for <34571-done@debbugs.gnu.org>; Wed, 20 Feb 2019 07:10:52 +0000 (UTC) Date: Wed, 20 Feb 2019 09:10:51 +0200 From: Efraim Flashner To: 34571-done@debbugs.gnu.org Subject: Re: [bug#34571] [PATCH] Add micropython Message-ID: <20190220071051.GB2177@macbook41> References: <20190219092216.GA32103@macbook41> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JP+T4n/bALQSJXh8" Content-Disposition: inline In-Reply-To: <20190219092216.GA32103@macbook41> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 User-Agent: Mutt/1.11.2 (2019-01-07) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 34571-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --JP+T4n/bALQSJXh8 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable pushed as 20801f9da8cd8669837c4cf6dc633792be53a9f0 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --JP+T4n/bALQSJXh8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlxs/XsACgkQQarn3Mo9 g1HzGw//R7YPqgv8/+P2hGa6HKQx/P1fLyVBwZhv5uB+1tkKe4AI2yxxtyYLo7Cb zRehD4cAaNYm1Yq/FkR9VrCwuMNk1lEnWHCMxYRYT/20iEY20t7MJ8g3Picfm1Ys PLw7fSz3G0UpmIIgwjw2O0yZFOlX2Hkde9mRxmjLhq7GJ0gWjJNj2XhnIfSRauwh a5bC/+9fjSR00pxlRv+rcyruu5V6h6HTH4PLjoWB5gGWX1SpflJO3/rY75mh0+r+ Ltsf5AccH2D9CY+BC+pGJl5bBQD40A05MEDGBQZs/GH7qrELqG81XD5c2HkruEYS FQ3+AYI3WDDMFB9bV0iNhV4CR7lOsRLZ4L206olFRy/FOa2MiaQ9tI//hZbIH88O ih6rjYlGKHt5nfE0mpVJez/ekqVSab5wz9MSnEF7kXtrDgrRPFbEOZ9hwg5dKzWr DLjPHok+U2AynGNN5t7qc5P8knFYHCLVBGGnQtJBVcYq+U+g43NtmEyRZop0Z86G h7L84myxSebYQZTSlDjOPkYu2HFxJ68BqPVyyR+ISiFDWzUyIkGR3RHsqhIH02l1 B7TeKkHeO3SAoclrYLJNXYRh+ey7E5rCsr7l6HFmfosQUPIZDO/rSN3hw3TKGwUP HxcKp0CB/5J8yFRvxoTWgvOcnxtlPuSLIuzh2Kz35cVjzDmxMSI= =Ylhw -----END PGP SIGNATURE----- --JP+T4n/bALQSJXh8-- ------------=_1550646662-4194-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Feb 2019 09:22:44 +0000 Received: from localhost ([127.0.0.1]:53886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw1bu-0005tO-LM for submit@debbugs.gnu.org; Tue, 19 Feb 2019 04:22:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw1bs-0005tB-F3 for submit@debbugs.gnu.org; Tue, 19 Feb 2019 04:22:40 -0500 Received: from lists.gnu.org ([209.51.188.17]:52130) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gw1bf-00048H-J6 for submit@debbugs.gnu.org; Tue, 19 Feb 2019 04:22:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gw1be-0008G5-GP for guix-patches@gnu.org; Tue, 19 Feb 2019 04:22:27 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gw1bc-00047C-7A for guix-patches@gnu.org; Tue, 19 Feb 2019 04:22:26 -0500 Received: from flashner.co.il ([178.62.234.194]:44122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gw1ba-00046S-6y for guix-patches@gnu.org; Tue, 19 Feb 2019 04:22:22 -0500 Received: from localhost (unknown [188.120.128.87]) by flashner.co.il (Postfix) with ESMTPSA id 9E66340047 for ; Tue, 19 Feb 2019 09:22:17 +0000 (UTC) Date: Tue, 19 Feb 2019 11:22:16 +0200 From: Efraim Flashner To: guix-patches@gnu.org Subject: [PATCH] Add micropython Message-ID: <20190219092216.GA32103@macbook41> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tjCHc7DPkfUGtrlw" Content-Disposition: inline X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 User-Agent: Mutt/1.11.2 (2019-01-07) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 178.62.234.194 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --tjCHc7DPkfUGtrlw Content-Type: multipart/mixed; boundary="YiEDa0DAkWCtVeE4" Content-Disposition: inline --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I was looking around to see if there was an alternate perl implementation and I ended up packaging micropython. I have no preference between it being in python.scm or embedded.scm --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-Add-micropython.patch" Content-Transfer-Encoding: quoted-printable =46rom fef607e04b951e7a893139f9afd0a0df3a2b8a52 Mon Sep 17 00:00:00 2001 =46rom: Efraim Flashner Date: Tue, 19 Feb 2019 11:20:02 +0200 Subject: [PATCH] gnu: Add micropython. * gnu/packages/python.scm (micropython): New variable. --- gnu/packages/python.scm | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 1c4ea720f..e5beac2ec 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -459,3 +459,49 @@ instead of @command{python3}."))) =20 (define-public python-wrapper (wrap-python3 python)) (define-public python-minimal-wrapper (wrap-python3 python-minimal)) + +(define-public micropython + (package + (name "micropython") + (version "1.10") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/micropython/micropython/" + "releases/download/v" version + "/micropython-" version ".tar.gz")) + (sha256 + (base32 + "1g1zjip3rkx6bp16qi1bag72wivnbh56fcsl3nffanrx4j5f4z90")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before 'build 'preprare-build + (lambda _ + (chdir "ports/unix") + ;; see: https://github.com/micropython/micropython/pull/4246 + (substitute* "Makefile" + (("-Os") "-Os -ffp-contract=3Doff")) + #t)) + (delete 'configure)) ; no configure + #:make-flags (list (string-append "PREFIX=3D" (assoc-ref %outputs "= out")) + "V=3D1") + #:test-target "test")) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python" ,python-minimal-wrapper))) + (inputs + `(("libffi" ,libffi))) + (home-page "https://micropython.org/") + (synopsis "Python implementation for microcontrollers and constrained = systems") + (description "MicroPython is a lean and efficient implementation of the +Python 3 programming language that includes a small subset of the Python +standard library and is optimised to run on microcontrollers and in constr= ained +environments. MicroPython is packed full of advanced features such as an +interactive prompt, arbitrary precision integers, closures, list comprehen= sion, +generators, exception handling and more. Still it is compact enough to fi= t and +run within just 256k of code space and 16k of RAM. MicroPython aims to be= as +compatible with normal Python as possible to allow you to transfer code wi= th +ease from the desktop to a microcontroller or embedded system.") + (license license:expat))) --=20 2.20.1 --YiEDa0DAkWCtVeE4-- --tjCHc7DPkfUGtrlw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlxrysgACgkQQarn3Mo9 g1Gz2BAAvmv6E26ZEabwp9hArKBYL8srH/EDGck1i1bwNwsgDNn8Y8WsJ/p4fLez sbHC2WoI3z0OY4SWlZR8oH9Qb4xyRUlR3ewuxtiFJXbRaTpqwIZQUKe1Fq6ByEH7 TrALITWaafVJBGXL5I44zqMVCimTwIarMb6vXvGz64ZHQu67WCB6uyKgMxQpk48H d8cBQZopPZ2sxrQr0CXI4IvYu8H8Uxd3KcyCJ4EYWb3AvPxw8ECTAfwLarg1CSxE 859DgpKMcmS9QNv63pbDiYfwx/AQ+oKkWOR1dT1frb4PCZnCm3g9WHhgc0A0tIcG v6y+iFPAzFq0/TZQZnZVDK9fDk9jCNI7ytJQD9xAlzI+dc4lMCxbTblI+32dYLSY 8pTR3fx42eCzp8Txx1VIS7mFP9Z1XEEWnX7pF14TcwKo33SGP+a7ybZp42dzdnuu HKcYQBXhmjxCjphQWuK3I2hL4x9m+rBYZZEYsIBV0FNdHNoOePlVmFoEwBX8dLpG wnptDttyJnY46eO8UUCsCOzsQpbUah04f8pLzqnejAwVjgsMuIRG3CCgHybn0C53 nXKk6L1YtKXLWgqLdgDFOfp7VbEsGkJVJw/WurvPnL9PQ5wwUb2BKUNeellCjKZu DXlt0N5rcFMMj6LF2r9Zp+7rc7kimNe+HBACgoaqeVlTXxleTo4= =7RID -----END PGP SIGNATURE----- --tjCHc7DPkfUGtrlw-- ------------=_1550646662-4194-1--