All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] micropython: new package
@ 2015-09-14 10:21 Chris Packham
  2015-09-14 13:06 ` Vicente Olivert Riera
                   ` (3 more replies)
  0 siblings, 4 replies; 38+ messages in thread
From: Chris Packham @ 2015-09-14 10:21 UTC (permalink / raw)
  To: buildroot

MicroPython - a lean and efficient Python implementation for
microcontrollers and constrained systems.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
---

Hi Buildroot,
    
Thought you might be interested in mircopython a minimal python 3
implementation. It's designed for micro controllers but is also well suited
to other general purpose embedded CPUs.
    
Cheers,
Chris

 package/Config.in                          |  2 ++
 package/micropython-lib/Config.in          |  7 +++++++
 package/micropython-lib/micropython-lib.mk | 12 ++++++++++++
 package/micropython/Config.in              |  8 ++++++++
 package/micropython/micropython.mk         | 22 ++++++++++++++++++++++
 5 files changed, 51 insertions(+)
 create mode 100644 package/micropython-lib/Config.in
 create mode 100644 package/micropython-lib/micropython-lib.mk
 create mode 100644 package/micropython/Config.in
 create mode 100644 package/micropython/micropython.mk

diff --git a/package/Config.in b/package/Config.in
index fc35f12..986fe16 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -509,6 +509,8 @@ menu "Lua libraries/modules"
 endmenu
 endif
 	source "package/lutok/Config.in"
+	source "package/micropython/Config.in"
+	source "package/micropython-lib/Config.in"
 	source "package/moarvm/Config.in"
 	source "package/mono/Config.in"
 if BR2_PACKAGE_MONO
diff --git a/package/micropython-lib/Config.in b/package/micropython-lib/Config.in
new file mode 100644
index 0000000..a7e017b
--- /dev/null
+++ b/package/micropython-lib/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_MICROPYTHON_LIB
+	bool "micropython-lib"
+	depends on BR2_PACKAGE_MICROPYTHON
+	help
+	  Core Python libraries ported to MicroPython.
+
+	  http://micropython.org
diff --git a/package/micropython-lib/micropython-lib.mk b/package/micropython-lib/micropython-lib.mk
new file mode 100644
index 0000000..c0e6a2a
--- /dev/null
+++ b/package/micropython-lib/micropython-lib.mk
@@ -0,0 +1,12 @@
+################################################################################
+# micropython-lib
+################################################################################
+MICROPYTHON_LIB_VERSION = v0.5
+MICROPYTHON_LIB_SITE = $(call github,micropython,micropython-lib,$(MICROPYTHON_LIB_VERSION))
+MICROPYTHON_LIB_LICENSE_FILES = LICENSE
+
+define MICROPYTHON_LIB_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D) PREFIX=$(TARGET_DIR)/usr/lib/micropython install
+endef
+
+$(eval $(generic-package))
diff --git a/package/micropython/Config.in b/package/micropython/Config.in
new file mode 100644
index 0000000..ca60f01
--- /dev/null
+++ b/package/micropython/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_MICROPYTHON
+	bool "micropython"
+	select BR2_PACKAGE_LIBFFI
+	help
+	  MicroPython - a lean and efficient Python implementation for
+	  microcontrollers and constrained systems.
+
+	  http://micropython.org
diff --git a/package/micropython/micropython.mk b/package/micropython/micropython.mk
new file mode 100644
index 0000000..9b5e7d2
--- /dev/null
+++ b/package/micropython/micropython.mk
@@ -0,0 +1,22 @@
+################################################################################
+# micropython
+################################################################################
+MICROPYTHON_VERSION = v1.4.5
+MICROPYTHON_SITE = $(call github,micropython,micropython,$(MICROPYTHON_VERSION))
+MICROPYTHON_LICENSE = MIT
+MICROPYTHON_LICENSE_FILES = LICENSE
+MICROPYTHON_DEPENDENCIES = libffi
+
+ifeq ($(BR2_powerpc),y)
+MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1
+endif
+
+define MICROPYTHON_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D)/unix \
+		CROSS_COMPILE=$(TARGET_CROSS) \
+		DESTDIR=$(TARGET_DIR) \
+		CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS) \
+		install
+endef
+
+$(eval $(generic-package))
-- 
2.5.0

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

end of thread, other threads:[~2015-09-19 12:00 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-14 10:21 [Buildroot] [PATCH] micropython: new package Chris Packham
2015-09-14 13:06 ` Vicente Olivert Riera
2015-09-14 23:14   ` Chris Packham
2015-09-14 13:40 ` Vicente Olivert Riera
2015-09-14 22:44   ` Chris Packham
2015-09-14 13:58 ` Thomas Petazzoni
2015-09-14 14:12   ` Vicente Olivert Riera
2015-09-14 23:03     ` Chris Packham
2015-09-15  8:24       ` Thomas Petazzoni
2015-09-15 19:49       ` Jörg Krause
2015-09-14 23:01   ` Chris Packham
2015-09-15  8:23     ` Thomas Petazzoni
2015-09-15  0:01 ` [Buildroot] [PATCHv2] " Chris Packham
2015-09-15 10:14   ` Vicente Olivert Riera
2015-09-15 10:19     ` Vicente Olivert Riera
2015-09-15 21:30       ` Chris Packham
2015-09-15 22:03     ` Thomas Petazzoni
2015-09-15 21:54   ` Chris Packham
2015-09-15 22:49     ` [Buildroot] [PATCHv3] " Chris Packham
2015-09-16  6:25       ` Jerzy Grzegorek
2015-09-16 21:12       ` Thomas Petazzoni
2015-09-16 23:28         ` Chris Packham
2015-09-16 23:29           ` [Buildroot] [PATCH v4 0/2] Micropython package Chris Packham
2015-09-16 23:29             ` [Buildroot] [PATCH v4 1/2] micropython: new package Chris Packham
2015-09-17  8:56               ` Vicente Olivert Riera
2015-09-18  4:54                 ` Chris Packham
2015-09-16 23:29             ` [Buildroot] [PATCH v4 2/2] micropython-lib: new packages Chris Packham
2015-09-17  8:56               ` Vicente Olivert Riera
2015-09-17 21:48             ` [Buildroot] [PATCH v4 0/2] Micropython package Thomas Petazzoni
2015-09-18  7:32             ` Thomas Petazzoni
2015-09-18  8:22               ` Chris Packham
2015-09-18  9:19                 ` [Buildroot] [PATCH] micropython: Set MICROPY_GCREGS_SETJMP=1 for xtensa and sh Chris Packham
2015-09-19 12:00                   ` Thomas Petazzoni
2015-09-18  9:29                 ` [Buildroot] [PATCH v4 0/2] Micropython package Vicente Olivert Riera
2015-09-18  9:43                   ` Chris Packham
2015-09-18  9:51                     ` [Buildroot] [PATCH] micropython: Set MPZ_DIG_SIZE=32 for 64 bit targets Chris Packham
2015-09-18 10:02                       ` Vicente Olivert Riera
2015-09-19  9:19                         ` Chris Packham

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.