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.

65 lines
1.5 KiB

  1. #
  2. # Copyright (C) 2017 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:=python-lxml
  9. PKG_VERSION:=4.4.2
  10. PKG_RELEASE:=1
  11. PYPI_NAME:=lxml
  12. PKG_HASH:=eff69ddbf3ad86375c344339371168640951c302450c5d3e9936e98d6459db06
  13. PKG_LICENSE:=BSD
  14. PKG_LICENSE_FILES:=LICENSES.txt
  15. PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  16. PKG_CPE_ID:=cpe:/a:lxml:lxml
  17. include ../pypi.mk
  18. include $(INCLUDE_DIR)/package.mk
  19. include ../python3-package.mk
  20. define Package/python-lxml/Default
  21. SECTION:=lang
  22. CATEGORY:=Languages
  23. SUBMENU:=Python
  24. URL:=https://lxml.de
  25. DEPENDS:=+libxml2 +libxslt +libexslt
  26. endef
  27. define Package/python3-lxml
  28. $(call Package/python-lxml/Default)
  29. TITLE:=python3-lxml
  30. DEPENDS+=+PACKAGE_python3-lxml:python3-light
  31. VARIANT:=python3
  32. endef
  33. define Package/python3-lxml/description
  34. The lxml XML toolkit is a Pythonic binding
  35. for the C libraries libxml2 and libxslt.
  36. .
  37. (Variant for Python3)
  38. endef
  39. TARGET_LDFLAGS += -lxml2 -lxslt -lexslt
  40. define Py3Build/Compile
  41. $(call Build/Compile/Py3Mod,, \
  42. install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
  43. --static \
  44. --single-version-externally-managed \
  45. , \
  46. INCLUDE="$(STAGING_DIR)/usr/include/ $(STAGING_DIR)/usr/include/libxml2" \
  47. LIBRARY="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib" \
  48. CFLAGS="$(TARGET_CFLAGS)" \
  49. LDFLAGS="$(TARGET_LDFLAGS)" \
  50. )
  51. endef
  52. $(eval $(call Py3Package,python3-lxml))
  53. $(eval $(call BuildPackage,python3-lxml))
  54. $(eval $(call BuildPackage,python3-lxml-src))