From patchwork Wed Oct 30 14:59:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Scott Fan X-Patchwork-Id: 2004245 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XdqzG5kS2z1xws for ; Thu, 31 Oct 2024 01:59:38 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 1FA0D60ACD; Wed, 30 Oct 2024 14:59:37 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 7ebKPmN8OZAB; Wed, 30 Oct 2024 14:59:36 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org ED4EF60ADC Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id ED4EF60ADC; Wed, 30 Oct 2024 14:59:35 +0000 (UTC) X-Original-To: buildroot@buildroot.org Delivered-To: buildroot@buildroot.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists1.osuosl.org (Postfix) with ESMTP id 704605E4F for ; Wed, 30 Oct 2024 14:59:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 5E43360ADD for ; Wed, 30 Oct 2024 14:59:34 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 3CYk2Ncly-Gq for ; Wed, 30 Oct 2024 14:59:33 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:4860:4864:20::2f; helo=mail-oa1-x2f.google.com; envelope-from=fancp2007@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 1AEE560ACD DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1AEE560ACD Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) by smtp3.osuosl.org (Postfix) with ESMTPS id 1AEE560ACD for ; Wed, 30 Oct 2024 14:59:32 +0000 (UTC) Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-290c69be014so1631963fac.3 for ; Wed, 30 Oct 2024 07:59:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730300371; x=1730905171; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4isNcPbyD+Sy/lBNSJLmrVNWy8lMeIi9uRhNQqoGSE8=; b=CgpW7LxP/RYlkF7pRd0aI7OGhkNHVFRiSrJfHF4J6CayHnzePcZ6BvtqDCebeHRziz +Io4/9OeIc0YouGhde/7LGFLTiPuZ2zVyyRHa3uxuagJHtYDbydt/gowXYDpxiis5cuI qC0HG3HQr1S7Q2gK2fZPnu4Ekm8u10ftbGaJxVfym8OSzrXTuWqQp3XBvCm6K9mnkFHB GOxtl7B/P36o41XQbYCxVFvG1TNEWere/tDY5F1lKO0xBOXVlwKnp3Uul3lQa6FJ8emr T91fARrz+8NNHjiz5S98ptNZFDvrejUQgkiN2nZUBsJm2yykUDLzjkV2nlkPPBhzqcNy VqEA== X-Gm-Message-State: AOJu0Yz9kTWjC8ka0z99maQeRxYJ8cy9xJN8Xslvp0UkfAJmKcvuvNxX Z3/WLp5VLH23WuWuFxmAJUaa73cSYvice8v4AUOFr/9yHVHnfk1cKVAchsYW X-Google-Smtp-Source: AGHT+IGEGlJ3f1WGerWGncZGvjA9PRBNPEnl9qFHy6cFFo1j7k25QKREHTYwL5tAhOwVdZtvYAlYqg== X-Received: by 2002:a05:6871:452:b0:277:da52:777 with SMTP id 586e51a60fabf-29051b6b5e1mr14143709fac.11.1730300371273; Wed, 30 Oct 2024 07:59:31 -0700 (PDT) Received: from localhost ([66.112.214.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7edc8495cabsm9354686a12.0.2024.10.30.07.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 07:59:30 -0700 (PDT) From: Scott Fan To: buildroot@buildroot.org Date: Wed, 30 Oct 2024 22:59:04 +0800 Message-ID: <20241030145910.2523465-2-fancp2007@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241030145910.2523465-1-fancp2007@gmail.com> References: <20241030134339.2482614-1-fancp2007@gmail.com> <20241030145910.2523465-1-fancp2007@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730300371; x=1730905171; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4isNcPbyD+Sy/lBNSJLmrVNWy8lMeIi9uRhNQqoGSE8=; b=DUI7a/5/z21ioPSdond87/P6j+pRzmdWmyv7Hma+zIzW/EGQlzIkWxnDiYyKuIdOZO wvBSi/1vqvtyiA2CEt37Ycz8wzkR3rOozl516TLU5aW/Czk6ViqHUPIm8t5RHlqa3r4u bchZ8nWxE5OM2DLiMPc7JrQcvx0JE8qlW6Ubm/aZEAglalTrmzt7E6qnUiWPHcXbZaL3 BDlCGr+oe3w8XE4EnzNUnORo0yAq0hjnhXSd5RMFQu7hotLJcFsWbdhR1DEdVT7NvNYw Oj096W+a82uHauKPQaXPHdY60rtUW1ftMbAhI5MUnZrWaqgyOKl52PphogvgOlUk4euS qSrg== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=DUI7a/5/ Subject: [Buildroot] [PATCH v5 2/2] package/python-pgcopy: new package X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: James Hilliard , Thomas Petazzoni , Asaf Kahlon , Scott Fan Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Scott Fan --- Changes v1 -> v2: - add missing config menu entry in Config.in Changes v2 -> v3: - fix help text indent in Config.in Changes v3 -> v4: - add missing dependencies in the Config.in file - add a comment for the hook PYTHON_PGCOPY_CLEAN_PY2_SCRIPT - remove the pre configure hook PYTHON_PGCOPY_CREATE_SETUP_CFG Changes v4 -> v5: - remove the postgresql dependency, python-psycopg2 has select it --- DEVELOPERS | 3 +++ package/Config.in | 1 + package/python-pgcopy/Config.in | 20 ++++++++++++++++++++ package/python-pgcopy/python-pgcopy.hash | 5 +++++ package/python-pgcopy/python-pgcopy.mk | 21 +++++++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 package/python-pgcopy/Config.in create mode 100644 package/python-pgcopy/python-pgcopy.hash create mode 100644 package/python-pgcopy/python-pgcopy.mk diff --git a/DEVELOPERS b/DEVELOPERS index 76f15f708a..f7cfbf3ad5 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2923,6 +2923,9 @@ F: package/lrzip/ N: Sam Voss F: package/ripgrep/ +N: Scott Fan +F: package/python-pgcopy/ + N: Sébastien Szymanski F: board/armadeus/ F: configs/armadeus* diff --git a/package/Config.in b/package/Config.in index b1e999a63b..eda877bce3 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1259,6 +1259,7 @@ menu "External python modules" source "package/python-pathvalidate/Config.in" source "package/python-periphery/Config.in" source "package/python-pexpect/Config.in" + source "package/python-pgcopy/Config.in" source "package/python-pickleshare/Config.in" source "package/python-piexif/Config.in" source "package/python-pigpio/Config.in" diff --git a/package/python-pgcopy/Config.in b/package/python-pgcopy/Config.in new file mode 100644 index 0000000000..424860899e --- /dev/null +++ b/package/python-pgcopy/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_PYTHON_PGCOPY + bool "python-pgcopy" + depends on BR2_USE_MMU # python-psycopg2 + depends on BR2_USE_WCHAR # python-psycopg2 + depends on !BR2_STATIC_LIBS # python-psycopg2 + depends on !BR2_OPTIMIZE_FAST # python-psycopg2 + select BR2_PACKAGE_PYTHON_PSYCOPG2 + select BR2_PACKAGE_PYTHON_PYTZ + help + Use pgcopy for fast data loading into PostgreSQL with + binary copy. + + https://github.com/altaurog/pgcopy + +comment "python-pgcopy needs a toolchain w/ dynamic library, wchar" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR + +comment "python-pgcopy can't be built with Optimize for fast" + depends on BR2_OPTIMIZE_FAST diff --git a/package/python-pgcopy/python-pgcopy.hash b/package/python-pgcopy/python-pgcopy.hash new file mode 100644 index 0000000000..9fa7990877 --- /dev/null +++ b/package/python-pgcopy/python-pgcopy.hash @@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/pgcopy/json +md5 bb7940ed821f54f32705c462f7582458 pgcopy-1.6.0.tar.gz +sha256 0da9235eea4ee9ceb4f52b97523bc89db9a6f8e80f897b49214e814ea13d04b0 pgcopy-1.6.0.tar.gz +# Locally computed sha256 checksums +sha256 969191428cb0729e689468bdcd152291a4e168875755c97745cd2df6de5520c1 LICENSE.txt diff --git a/package/python-pgcopy/python-pgcopy.mk b/package/python-pgcopy/python-pgcopy.mk new file mode 100644 index 0000000000..376f8649a9 --- /dev/null +++ b/package/python-pgcopy/python-pgcopy.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# python-pgcopy +# +################################################################################ + +PYTHON_PGCOPY_VERSION = 1.6.0 +PYTHON_PGCOPY_SOURCE = pgcopy-$(PYTHON_PGCOPY_VERSION).tar.gz +PYTHON_PGCOPY_SITE = https://files.pythonhosted.org/packages/b0/7d/a5c833f921b20cdb1e8538e72a6065bcc67bbb270fa7a35e98f2d397ce0c +PYTHON_PGCOPY_SETUP_TYPE = setuptools +PYTHON_PGCOPY_LICENSE = MIT +PYTHON_PGCOPY_LICENSE_FILES = LICENSE.txt +PYTHON_PGCOPY_DEPENDENCIES = python-psycopg2 python-pytz + +# Remove the file only for Python 2, it will cause compilation errors +define PYTHON_PGCOPY_CLEAN_PY2_SCRIPT + $(RM) $(@D)/pgcopy/errors/py2.py +endef +PYTHON_PGCOPY_POST_EXTRACT_HOOKS += PYTHON_PGCOPY_CLEAN_PY2_SCRIPT + +$(eval $(python-package))