Files
packages/lang/python/python-jmespath/Makefile
T
Alexandru Ardelean e7aff35e97 python-jmespath: install jp as a non-byte-compiled command
Upstream ships its jp command-line tool as a plain "jp.py" script. Under
that name OpenWrt byte-compiles it into a non-executable /usr/bin/jp.pyc
(and the -src package keeps a "#!/usr/bin/env python" jp.py, which has no
interpreter on OpenWrt), so it fails the CI generic executable check.

Install it as /usr/bin/jp instead: the missing .py extension stops it from
being byte-compiled and Python3/FixShebang rewrites the shebang to
/usr/bin/python3. Add a test-version.sh override since jp takes a required
expression argument and has no version flag for the generic check to probe.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2026-06-09 09:27:30 +03:00

40 lines
1.0 KiB
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=python-jmespath
PKG_VERSION:=1.1.0
PKG_RELEASE:=2
PYPI_NAME:=jmespath
PKG_HASH:=472c87d80f36026ae83c6ddd0f1d05d4e510134ed462851fd5f754c8c3cbb88d
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.txt
include ../pypi.mk
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk
define Package/python3-jmespath
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
TITLE:=JSON Matching Expressions
URL:=https://github.com/jmespath/jmespath.py
DEPENDS:=+python3-light
endef
define Package/python3-jmespath/description
JMESPath (pronounced james path) allows you to declaratively specify
how to extract elements from a JSON document.
endef
define Py3Package/python3-jmespath/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jp.py $(1)/usr/bin/jp
endef
$(eval $(call Py3Package,python3-jmespath))
$(eval $(call BuildPackage,python3-jmespath))
$(eval $(call BuildPackage,python3-jmespath-src))