diff options
| author | Hauke Mehrtens <hauke@hauke-m.de> | 2017-06-05 18:48:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-05 18:48:47 +0200 |
| commit | 5f6b5be6c6d399bc144235a774093514e4ca72e6 (patch) | |
| tree | 5ebc3136c381fe3033bf9cfae1b2ff3b148bda27 /lang/python/python-lxml | |
| parent | 794e917b1a07115e369184027bc51f26cd8f52cf (diff) | |
| parent | ff016a48021f37434efaf8c9c292ea85c0244ed6 (diff) | |
Merge pull request #4382 from commodo/python-lxml
[new package] python-lxml: add initial version (with python3 variant included)
Diffstat (limited to 'lang/python/python-lxml')
| -rw-r--r-- | lang/python/python-lxml/Makefile | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/lang/python/python-lxml/Makefile b/lang/python/python-lxml/Makefile new file mode 100644 index 000000000..2710feffb --- /dev/null +++ b/lang/python/python-lxml/Makefile @@ -0,0 +1,94 @@ +# +# Copyright (C) 2017 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-lxml +PKG_VERSION:=3.7.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=lxml-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://lxml.de/files/ +PKG_HASH:=59d9176360dbc3919e9d4bfca85c1ca64ab4f4ee00e6f119d7150ba887e3410a + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-lxml-$(PKG_VERSION) +PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) + +PKG_LICENSE:=BSD +PKG_LICENSE_FILES:=LICENSES.txt +PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com> + +include $(INCLUDE_DIR)/package.mk +$(call include_mk, python-package.mk) +$(call include_mk, python3-package.mk) + +define Package/python-lxml/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + URL:=http://lxml.de + DEPENDS:=+libxml2 +libxslt +libexslt +endef + +define Package/python-lxml +$(call Package/python-lxml/Default) + TITLE:=python-lxml + DEPENDS+=+python-light +python-codecs + VARIANT:=python +endef + +define Package/python3-lxml +$(call Package/python-lxml/Default) + TITLE:=python3-lxml + DEPENDS+=+python3-light + VARIANT:=python3 +endef + +define Package/python-lxml/description +The lxml XML toolkit is a Pythonic binding +for the C libraries libxml2 and libxslt. +endef + +define Package/python3-lxml/description +$(call Package/python-lxml/description) +. +(Variant for Python3) +endef + +TARGET_LDFLAGS += -lxml2 -lxslt -lexslt + +define PyBuild/Compile/Default + $(call Build/Compile/PyMod,, \ + install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ + --static \ + --single-version-externally-managed \ + , \ + INCLUDE="$(STAGING_DIR)/usr/include/ $(STAGING_DIR)/usr/include/libxml2" \ + LIBRARY="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + ) +endef + +define Py3Build/Compile/Default + $(call Build/Compile/Py3Mod,, \ + install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \ + --static \ + --single-version-externally-managed \ + , \ + INCLUDE="$(STAGING_DIR)/usr/include/ $(STAGING_DIR)/usr/include/libxml2" \ + LIBRARY="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + ) +endef + +$(eval $(call PyPackage,python-lxml)) +$(eval $(call BuildPackage,python-lxml)) + +$(eval $(call Py3Package,python3-lxml)) +$(eval $(call BuildPackage,python3-lxml)) |
