aboutsummaryrefslogtreecommitdiff
path: root/lang/python/python-flit-core
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2023-02-27 20:20:15 +0800
committerJeffery To <jeffery.to@gmail.com>2023-03-30 12:19:05 +0800
commit2f37a616afe3f537aa23f8953ed55fc9e5f5fa25 (patch)
tree578d7d38f1f162add5dc911198c94a92c7564df2 /lang/python/python-flit-core
parentfe78c07a316b1722b8d35b63772a7067dfd87c5e (diff)
python-flit-core: Add host-only package
From the README: This provides a PEP 517 build backend for packages using Flit. The only public interface is the API specified by PEP 517, at flit_core.buildapi. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'lang/python/python-flit-core')
-rw-r--r--lang/python/python-flit-core/Makefile60
1 files changed, 60 insertions, 0 deletions
diff --git a/lang/python/python-flit-core/Makefile b/lang/python/python-flit-core/Makefile
new file mode 100644
index 000000000..42274d6d8
--- /dev/null
+++ b/lang/python/python-flit-core/Makefile
@@ -0,0 +1,60 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-flit-core
+PKG_VERSION:=3.8.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=flit-core
+PYPI_SOURCE_NAME:=flit_core
+PKG_HASH:=b305b30c99526df5e63d6022dd2310a0a941a187bd3884f4c8ef0418df6c39f3
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:=python3/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-flit-core
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Distribution-building parts of Flit
+ URL:=https://github.com/pypa/flit
+ DEPENDS:=+python3-light +python3-email +python3-logging
+ BUILDONLY:=1
+endef
+
+define Package/python3-flit-core/description
+This provides a PEP 517 build backend for packages using Flit. The only
+public interface is the API specified by PEP 517, at flit_core.buildapi.
+endef
+
+define Py3Host/Install/Installer
+ $(call HostPython3/Run, \
+ $(HOST_BUILD_DIR), \
+ bootstrap_install.py \
+ --installdir "$(1)/lib/python$(PYTHON3_VERSION)/site-packages" \
+ "$(PYTHON3_HOST_BUILD_DIR)"/openwrt-build/$(PYPI_SOURCE_NAME)-$(PKG_VERSION)-*.whl \
+ )
+endef
+
+Host/Compile=$(Py3Host/Compile/Bootstrap)
+
+$(eval $(call Py3Package,python3-flit-core))
+$(eval $(call BuildPackage,python3-flit-core))
+$(eval $(call BuildPackage,python3-flit-core-src))
+$(eval $(call HostBuild))