python-pyelftools: install /usr/bin/pyreadelf
authorAlexandru Ardelean <redacted>
Mon, 1 Jun 2026 05:37:26 +0000 (08:37 +0300)
committerAlexandru Ardelean <redacted>
Tue, 2 Jun 2026 11:42:30 +0000 (14:42 +0300)
The wheel's /usr/bin/readelf.py collides with binutils' /usr/bin/readelf
and gets its shebang stripped by CompileAll + DeleteSourceFiles. Rename
to pyreadelf via the Py3Package install hook, matching Fedora's package.

Also depend on python3-asyncio and python3-codecs: elftools.construct.debug
imports pdb, and Python 3.14's pdb pulls in asyncio (via _pyrepl) and
unicodedata (via _pyrepl.utils) at import time.

Signed-off-by: Alexandru Ardelean <redacted>
lang/python/python-pyelftools/Makefile

index 36d338abccde95c556da4e2d14bf05ce2d152894..c4c840fa08417f5b68ad1507fbe97480f0ed996b 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pyelftools
 PKG_VERSION:=0.32
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=pyelftools
 PKG_HASH:=6de90ee7b8263e740c8715a925382d4099b354f29ac48ea40d840cf7aa14ace5
@@ -36,13 +36,18 @@ define Package/python3-pyelftools
   SUBMENU:=Python
   TITLE:=Library for analyzing ELF files and DWARF debugging information
   URL:=https://pypi.org/project/pyelftools
-  DEPENDS:=+python3-light +python3-logging
+  DEPENDS:=+python3-light +python3-logging +python3-asyncio +python3-codecs
 endef
 
 define Package/python3-pyelftools/description
 Library for analyzing ELF files and DWARF debugging information
 endef
 
+define Py3Package/python3-pyelftools/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/readelf.py $(1)/usr/bin/pyreadelf
+endef
+
 $(eval $(call Py3Package,python3-pyelftools))
 $(eval $(call BuildPackage,python3-pyelftools))
 $(eval $(call BuildPackage,python3-pyelftools-src))
git clone https://git.99rst.org/PROJECT