From patchwork Thu Dec 19 20:38:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clayton Shotwell X-Patchwork-Id: 303715 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 42D082C0079 for ; Fri, 20 Dec 2013 07:38:38 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9CE6093C3F; Thu, 19 Dec 2013 20:38:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cmrsax8w8YxC; Thu, 19 Dec 2013 20:38:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 965DF93D3A; Thu, 19 Dec 2013 20:38:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0F65E1BF99B for ; Thu, 19 Dec 2013 20:38:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0FB918C5BE for ; Thu, 19 Dec 2013 20:38:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YbabjOEPd12c for ; Thu, 19 Dec 2013 20:38:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from secvs02.rockwellcollins.com (secvs02.rockwellcollins.com [205.175.225.241]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5DCC08C318 for ; Thu, 19 Dec 2013 20:38:34 +0000 (UTC) Received: from nosuchhost.198.131.in-addr.arpa (HELO collinscrsmtp01.rockwellcollins.com) ([131.198.63.132]) by mail-virt.rockwellcollins.com with ESMTP; 19 Dec 2013 14:38:26 -0600 Received: from nyx ([131.198.63.11]) by collinscrsmtp01.rockwellcollins.com (Lotus Domino Release 8.5.2FP2 HF162) with ESMTP id 2013121914382544-2990155 ; Thu, 19 Dec 2013 14:38:25 -0600 From: Clayton Shotwell To: buildroot@busybox.net Date: Thu, 19 Dec 2013 14:38:02 -0600 Message-Id: <1387485489-4186-14-git-send-email-clshotwe@rockwellcollins.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1387485489-4186-1-git-send-email-clshotwe@rockwellcollins.com> References: <1387485489-4186-1-git-send-email-clshotwe@rockwellcollins.com> X-MIMETrack: Itemize by SMTP Server on CollinsCRSMTP01/CedarRapids/Collins/Rockwell(Release 8.5.2FP2 HF162|May 16, 2011) at 12/19/2013 02:38:25 PM, Serialize by Router on CollinsCRSMTP01/CedarRapids/Collins/Rockwell(Release 8.5.2FP2 HF162|May 16, 2011) at 12/19/2013 02:38:26 PM, Serialize complete at 12/19/2013 02:38:26 PM X-TNEFEvaluated: 1 Cc: Clayton Shotwell Subject: [Buildroot] [PATCH v5 13/20] python-pyxml: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Clayton Shotwell --- Changes v4 -> v5: - Changed to the new python infrastructure. Changes v3 -> v4: - Correcting the download path (suggested by Thomas). - Removed the clean commands. Changes v2 -> v3: - No changes. Changes v1 -> v2: - General cleanup to the mk file to conform to the standard format. --- package/Config.in | 1 + package/python-pyxml/Config.in | 11 ++++++++ package/python-pyxml/python-xml.mk | 50 ++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 0 deletions(-) create mode 100644 package/python-pyxml/Config.in create mode 100644 package/python-pyxml/python-xml.mk diff --git a/package/Config.in b/package/Config.in index 7cdcaab..3d9fb19 100644 --- a/package/Config.in +++ b/package/Config.in @@ -410,6 +410,7 @@ source "package/python-pysnmp/Config.in" source "package/python-pysnmp-apps/Config.in" source "package/python-pysnmp-mibs/Config.in" source "package/python-pyusb/Config.in" +source "package/python-pyxml/Config.in" source "package/python-pyzmq/Config.in" source "package/python-serial/Config.in" source "package/python-setuptools/Config.in" diff --git a/package/python-pyxml/Config.in b/package/python-pyxml/Config.in new file mode 100644 index 0000000..420f3ad --- /dev/null +++ b/package/python-pyxml/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PYTHON_PYXML + bool "python-pyxml" + depends on BR2_PACKAGE_PYTHON + help + This is the Python XML package. The distribution contains a + validating XML parser, an implementation of the SAX and DOM + programming interfaces, an interface to the Expat parser (and the + Expat parser itself), and a C helper module that can speed up + xmllib.py by a factor of 5. There's even documentation! + + http://pyxml.sourceforge.net/topics/index.html diff --git a/package/python-pyxml/python-xml.mk b/package/python-pyxml/python-xml.mk new file mode 100644 index 0000000..bdf6a71 --- /dev/null +++ b/package/python-pyxml/python-xml.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# python-pyxml +# +################################################################################ + +PYTHON_PYXML_VERSION = 0.8.4 +PYTHON_PYXML_SOURCE = PyXML-$(PYTHON_PYXML_VERSION).tar.gz +PYTHON_PYXML_SITE = http://downloads.sourceforge.net/project/pyxml/pyxml/0.8.4/ +PYTHON_PYXML_LICENSE = BSD-3c +PYTHON_PYXML_LICENSE_FILES = LICENSE + +PYTHON_PYXML_DEPENDENCIES = host-python python expat + +PYTHON_PYXML_INSTALL_STAGING = NO + +define PYTHON_PYXML_BUILD_CMDS + (cd $(@D); \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ + LDSHARED="$(TARGET_CC) -shared" \ + LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ + $(HOST_DIR)/usr/bin/python setup.py build_ext \ + --include-dirs=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \ + --with-libexpat=$(STAGING_DIR)/usr \ + ) + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define PYTHON_PYXML_INSTALL_STAGING_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(STAGING_DIR)/usr) +endef + +define PYTHON_PYXML_INSTALL_TARGET_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) +endef + +HOST_PYTHON_PYXML_DEPENDENCIES = host-python + +define HOST_PYTHON_PYXML_BUILD_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build_ext --with-libexpat=$(HOST_DIR)/usr) + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define HOST_PYTHON_PYXML_INSTALL_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(HOST_DIR)/usr) +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package))