b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | # |
| 2 | # Copyright (C) 2023 Jeffery To |
| 3 | # |
| 4 | # This is free software, licensed under the GNU General Public License v2. |
| 5 | # See /LICENSE for more information. |
| 6 | # |
| 7 | |
| 8 | include $(TOPDIR)/rules.mk |
| 9 | |
| 10 | PKG_NAME:=python-hatch-fancy-pypi-readme |
| 11 | PKG_VERSION:=23.1.0 |
| 12 | PKG_RELEASE:=1 |
| 13 | |
| 14 | PYPI_NAME:=hatch-fancy-pypi-readme |
| 15 | PYPI_SOURCE_NAME:=hatch_fancy_pypi_readme |
| 16 | PKG_HASH:=b1df44063094af1e8248ceacd47a92c9cf313d6b9823bf66af8a927c3960287d |
| 17 | |
| 18 | PKG_LICENSE:=MIT |
| 19 | PKG_LICENSE_FILES:=LICENSE.txt |
| 20 | PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com> |
| 21 | |
| 22 | PKG_HOST_ONLY:=1 |
| 23 | HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host python-hatchling/host |
| 24 | |
| 25 | include ../pypi.mk |
| 26 | include $(INCLUDE_DIR)/package.mk |
| 27 | include $(INCLUDE_DIR)/host-build.mk |
| 28 | include ../python3-package.mk |
| 29 | include ../python3-host-build.mk |
| 30 | |
| 31 | define Package/python3-hatch-fancy-pypi-readme |
| 32 | SECTION:=lang |
| 33 | CATEGORY:=Languages |
| 34 | SUBMENU:=Python |
| 35 | TITLE:=Fancy PyPI READMEs with Hatch |
| 36 | URL:=https://github.com/hynek/hatch-fancy-pypi-readme |
| 37 | DEPENDS:=+python3-light +python3-hatchling |
| 38 | BUILDONLY:=1 |
| 39 | endef |
| 40 | |
| 41 | define Package/python3-hatch-fancy-pypi-readme/description |
| 42 | hatch-fancy-pypi-readme is a Hatch metadata plugin for everyone who |
| 43 | cares about the first impression of their project’s PyPI landing page. |
| 44 | It allows you to define your PyPI project description in terms of |
| 45 | concatenated fragments that are based on static strings, files, and most |
| 46 | importantly: parts of files defined using cut-off points or regular |
| 47 | expressions. |
| 48 | |
| 49 | Once you’ve assembled your readme, you can additionally run regular |
| 50 | expression-based substitutions over it. For instance to make relative |
| 51 | links absolute or to linkify users and issue numbers in your changelog. |
| 52 | endef |
| 53 | |
| 54 | $(eval $(call Py3Package,python3-hatch-fancy-pypi-readme)) |
| 55 | $(eval $(call BuildPackage,python3-hatch-fancy-pypi-readme)) |
| 56 | $(eval $(call BuildPackage,python3-hatch-fancy-pypi-readme-src)) |
| 57 | $(eval $(call HostBuild)) |