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.

53 lines
1.5 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-lib
  9. PKG_RELEASE:=1
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL:=https://github.com/micropython/micropython-lib.git
  12. PKG_SOURCE_VERSION:=cdd260f0792d04a1ded99171b4c7a2582b7856b4
  13. PKG_SOURCE_DATE:=20211112
  14. PKG_MIRROR_HASH:=fea11185756e746e78cfe66dc4fa33830721cd94d726ac7cf4dde2e0a16d5041
  15. PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
  16. PKG_LICENSE:=MIT PSF-2.0
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/micropython-lib
  21. SUBMENU:=Python
  22. SECTION:=lang
  23. CATEGORY:=Languages
  24. TITLE:=micropython-lib
  25. URL:=https://github.com/micropython/micropython-lib
  26. DEPENDS:=+micropython
  27. endef
  28. define Package/micropython-lib/description
  29. This is a repository of libraries designed to be useful for writing
  30. MicroPython applications.
  31. endef
  32. Build/Compile:=:
  33. define Package/micropython-lib/install
  34. for dir in micropython python-ecosys python-stdlib unix-ffi; do \
  35. $(INSTALL_DIR) $(1)/usr/lib/micropython/$$$$dir ; \
  36. $(CP) $(PKG_BUILD_DIR)/$$$$dir/* $(1)/usr/lib/micropython/$$$$dir/ ; \
  37. done
  38. $(FIND) $(1)/usr/lib/micropython \
  39. -not -type d \( -not -name '*.py' -o -name 'test_*' -o -name 'setup.py' \) -delete
  40. $(FIND) $(1)/usr/lib/micropython -mindepth 1 -empty -type d -delete
  41. endef
  42. $(eval $(call BuildPackage,micropython-lib))