From patchwork Mon Mar 12 10:12:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 884402 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Pm/lZz0E"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 400DMX4fZfz9sRN for ; Mon, 12 Mar 2018 21:13:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 27F92852F8; Mon, 12 Mar 2018 10:13:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nr4imxGQMDjb; Mon, 12 Mar 2018 10:13:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id A8A3C855E3; Mon, 12 Mar 2018 10:13:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id C2D4B1C2BAA for ; Mon, 12 Mar 2018 10:12:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id BF93387E71 for ; Mon, 12 Mar 2018 10:12:57 +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 XQZse5O7FjJc for ; Mon, 12 Mar 2018 10:12:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-it0-f68.google.com (mail-it0-f68.google.com [209.85.214.68]) by hemlock.osuosl.org (Postfix) with ESMTPS id E878E87499 for ; Mon, 12 Mar 2018 10:12:56 +0000 (UTC) Received: by mail-it0-f68.google.com with SMTP id e64-v6so10669003ita.5 for ; Mon, 12 Mar 2018 03:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bCyZ1Wrvfsh9Yp1EP6mfZCypl1/pzODtnINMSYeaGWY=; b=Pm/lZz0ECyAQam7h6tVfyb8C0W8/kkW2deW4OVmHAAtnfnFfjYpdvrrYIIE397pOzt Rp0KazSCrr7D/XmnlfrTOzHi1voMLf24oaD2ZFravNrIHAeQeqGmNJAXxKWt38La2GLp UuygAZUUTICyNLIOWBv7mb9vHkhOy5K0uqkvz3BzUTiNRGTaBrGbof+CKM1ym/cJddWh TICkChEj4wTv/wD4lkhra2+L6c+o2X9NRyFTiVabK0QBh6WQxBs0bGMZBpvh2SrIDduY KAPjSogILyp9Yna71/lXmpXu3b3T6HzQgce65MloRL2YXCSncM6fwrr68fXaNtgkyXp1 RBMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bCyZ1Wrvfsh9Yp1EP6mfZCypl1/pzODtnINMSYeaGWY=; b=i1QtbmtmzlgxBkVsvWR5lulHFVbnSAhBM/JbDwB3ktFCM+n406ktB1XeStVRFIHkJw KDvalPgVy8kQw7uUI72gNN9OwUsozLF95dj4LYtArsMR1TZaw+t2xbdBlSXrj58j93xW RYqeGadikoKtmUQd33tcMg4oCaA0C6OZi/m6HgEZ6dKIghyJYN0GRjfaOigCXT6zwC46 p9v2vDz1hXzipRTYSnafwcPu9op9qstEfcEYoS8+lw3u9kDnqfeQxKNOv/3TXEJngtAc nd5T+m/pRAaKHxEHBXtYpqNaOB8/W8qK8Y7bVoJcHmEj+WmuX90qf66Q4GBZCNaSWAeq cNrw== X-Gm-Message-State: AElRT7EODxVo7SbfTaqf6lwKYWHOnQ3UHE75USA5kXgKXbr4aPHvDl3J QSdt5CF2H7PTrRol83eVBivUoMG2 X-Google-Smtp-Source: AG47ELtRsM7a3Klzbs+qnm6AfAN4dEj4LjIe0UJZvwvigkjrV4x73F7Lpu6VHhFuNAhS6mf1Wv+nFQ== X-Received: by 10.36.47.147 with SMTP id j141mr7898844itj.140.1520849575892; Mon, 12 Mar 2018 03:12:55 -0700 (PDT) Received: from localhost.localdomain (mail.codeblue.com. [65.183.183.198]) by smtp.gmail.com with ESMTPSA id 202sm3278389itu.23.2018.03.12.03.12.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Mar 2018 03:12:54 -0700 (PDT) From: Adam Duskett To: buildroot@buildroot.org Date: Mon, 12 Mar 2018 06:12:31 -0400 Message-Id: <20180312101231.2280-2-aduskett@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180312101231.2280-1-aduskett@gmail.com> References: <20180312101231.2280-1-aduskett@gmail.com> Subject: [Buildroot] [PATCH v3 2/2] python-psycopg2: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adam Duskett MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Psycopg is the most popular PostgreSQL database adapter for the Python programming language. Its main features are the complete implementation of the Python DB API 2.0 specification and the thread safety (several threads can share the same connection). It was designed for heavily multi-threaded applications that create and destroy lots of cursors and make a large number of concurrent INSERTs or UPDATEs. Signed-off-by: Adam Duskett Reviewed-by: Yegor Yefremov Signed-off-by: Adam Duskett < --- Changes v1 -> v2: - None Changes v2 -> v3: - Removed python-psycopg2/0001-don-t-use-pg_config.patch - Added PYTHON_PSYCOPG2_BUILD_OPTS and PYTHON_PSYCOPG2_INSTALL_TARGET_OPTS to point towards Buildroots own pg_config file. (Thomas) - Updated to 2.7.4 DEVELOPERS | 1 + package/Config.in | 1 + package/python-psycopg2/Config.in | 22 ++++++++++++++++++++++ package/python-psycopg2/python-psycopg2.hash | 4 ++++ package/python-psycopg2/python-psycopg2.mk | 21 +++++++++++++++++++++ 5 files changed, 49 insertions(+) create mode 100644 package/python-psycopg2/Config.in create mode 100644 package/python-psycopg2/python-psycopg2.hash create mode 100644 package/python-psycopg2/python-psycopg2.mk diff --git a/DEVELOPERS b/DEVELOPERS index 3df820e712..6329bcde2d 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -53,6 +53,7 @@ F: package/nginx-naxsi/ F: package/policycoreutils/ F: package/python-flask-sqlalchemy/ F: package/python-mutagen/ +F: package/python-psycopg2/ F: package/python-sqlalchemy/ F: package/restorecond/ F: package/refpolicy/ diff --git a/package/Config.in b/package/Config.in index 449ffcc47b..d40170ccf9 100644 --- a/package/Config.in +++ b/package/Config.in @@ -856,6 +856,7 @@ menu "External python modules" source "package/python-prompt-toolkit/Config.in" source "package/python-protobuf/Config.in" source "package/python-psutil/Config.in" + source "package/python-psycopg2/Config.in" source "package/python-ptyprocess/Config.in" source "package/python-pudb/Config.in" source "package/python-pyasn/Config.in" diff --git a/package/python-psycopg2/Config.in b/package/python-psycopg2/Config.in new file mode 100644 index 0000000000..ec852bb49e --- /dev/null +++ b/package/python-psycopg2/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_PYTHON_PSYCOPG2 + bool "python-psycopg2" + select BR2_PACKAGE_POSTGRESQL + help + Psycopg is the most popular PostgreSQL database adapter for + the Python programming language. Its main features are the + complete implementation of the Python DB API 2.0 specification + and the thread safety (several threads can share the same + connection). It was designed for heavily multi-threaded + applications that create and destroy lots of cursors and make + a large number of concurrent INSERTs or UPDATEs. + + Psycopg 2 is mostly implemented in C as a libpq wrapper, + resulting in being both efficient and secure. It features + client-side and server-side cursors, asynchronous + communication and notifications, COPY support. Many Python + types are supported out-of-the-box and adapted to matching + PostgreSQL data types; adaptation can be extended and + customized thanks to a flexible objects adaptation system. + Psycopg 2 is both Unicode and Python 3 friendly. + + http://initd.org/psycopg/ diff --git a/package/python-psycopg2/python-psycopg2.hash b/package/python-psycopg2/python-psycopg2.hash new file mode 100644 index 0000000000..ea4a07697b --- /dev/null +++ b/package/python-psycopg2/python-psycopg2.hash @@ -0,0 +1,4 @@ +# md5 from https://pypi.python.org/pypi/psycopg2/json, sha256 locally computed +md5 70fc57072e084565a42689d416cf2c5c psycopg2-2.7.4.tar.gz +sha256 8bf51191d60f6987482ef0cfe8511bbf4877a5aa7f313d7b488b53189cf26209 psycopg2-2.7.4.tar.gz +sha256 1752db3c786e12b62ca804178dca033adce8bff4c4b3d98d3449d407fe45210d LICENSE diff --git a/package/python-psycopg2/python-psycopg2.mk b/package/python-psycopg2/python-psycopg2.mk new file mode 100644 index 0000000000..3cb8c85778 --- /dev/null +++ b/package/python-psycopg2/python-psycopg2.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# python-psycopg2 +# +################################################################################ + +PYTHON_PSYCOPG2_VERSION = 2.7.4 +PYTHON_PSYCOPG2_SOURCE = psycopg2-$(PYTHON_PSYCOPG2_VERSION).tar.gz +PYTHON_PSYCOPG2_SITE = https://pypi.python.org/packages/74/83/51580322ed0e82cba7ad8e0af590b8fb2cf11bd5aaa1ed872661bd36f462 +PYTHON_PSYCOPG2_SETUP_TYPE = setuptools +PYTHON_PSYCOPG2_LICENSE = LGPL-3.0+ +PYTHON_PSYCOPG2_LICENSE_FILES = LICENSE +PYTHON_PSYCOPG2_DEPENDENCIES = postgresql + +# Force psycopg2 to use the BuildRoot provided postgresql version instead of +# The host machines +PYTHON_PSYCOPG2_BUILD_OPTS += build_ext --pg-config=$(STAGING_DIR)/usr/bin/pg_config + +PYTHON_PSYCOPG2_INSTALL_TARGET_OPTS += build_ext --pg-config=$(STAGING_DIR)/usr/bin/pg_config + +$(eval $(python-package))