You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.3 KiB

  1. #
  2. # Copyright (C) 2008-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=micropython
  9. PKG_VERSION:=1.9.4
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/micropython/micropython/releases/download/v$(PKG_VERSION)
  13. PKG_HASH:=0db042011bffcbd65362b67eb3cca87eaefa9f2a55b747fa75e922c706b8ce1a
  14. PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_BUILD_PARALLEL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/micropython
  20. SUBMENU:=Python
  21. SECTION:=lang
  22. CATEGORY:=Languages
  23. TITLE:=Micro Python
  24. URL:=https://micropython.org
  25. DEPENDS:=+libffi
  26. endef
  27. define Package/micropython/description
  28. This package contains Micro Python, a lean and fast implementation of the Python 3.4 programming language
  29. that is optimised to run on a microcontroller (and low power computers).
  30. endef
  31. MAKE_FLAGS += -C $(PKG_BUILD_DIR)/ports/unix FROZEN_MPY_DIR=
  32. define Build/Compile
  33. $(call Build/Compile/Default,axtls)
  34. $(call Build/Compile/Default)
  35. endef
  36. define Package/micropython/install
  37. $(INSTALL_DIR) $(1)/usr/bin
  38. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ports/unix/micropython $(1)/usr/bin/micropython
  39. endef
  40. $(eval $(call BuildPackage,micropython))