From nobody Thu Mar 09 03:22:57 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PXDyp0xdYz3xGRW; Thu, 9 Mar 2023 03:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PXDyp0T7dz3p37; Thu, 9 Mar 2023 03:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678332178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B/Wjv70Wz0X1tnahe40jZ6sLktr8gWEBzjMtT2/ZXLk=; b=w+o3/D1XlcV4wQVqj74TzYtIt5FTVQE/bt47E2ea8irX9LrjTTVc3txxQjtJuWg0wzSKvf ax/kIn0fd3ufFvR+kIzluFaFePNad19j5wVdflj7KOSsqhwdCYrCHl83q+DWpT/Zv5l4pi MI3GnkxZzhgk32iooFYjKCXiVKOpX9mrE6Gn9gutRJExLUaUlScZqsIBp97vIGzC9I8qc0 /5WA7roVZY5BsZXE9o1N60CKrC/OQ8MeQ1uZZ8zdAx8YPCZg3MHZt+u8TiE3wHHJfRj0EH nbsQkKD5kyZ+SGqqAD21mc1TUaoBEiit8Fv9c6nHEBioGCvi7QO+zXO7PSWQpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678332178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B/Wjv70Wz0X1tnahe40jZ6sLktr8gWEBzjMtT2/ZXLk=; b=ui8N7KK40fzeS6r9FMd0qX6IiddaoUrsEmybiFz8ae/GLrUtkGZw99RvGqVCvectkKWs3z SymYN5KxzkY8TpssuEAI+ZJFvTG/sQ1BsnzspHCzsEzmA4dtFz/j/EpXvZL1+hwJzNc8kb yXRJKDcUtF+Fi1D5NMLrMX6l1pfHnop2Usx38I5JfjGddBCuVvvAlJUGpV+8IjgHwF6Vu7 +aMbOCSF67OuJmyZH9EL0/2OhjHYU+pXET8mQOp60cS0tAWkEB7fFF+idpuD7MM31Qzop5 qGC+1vh1C5OKD5SpB2AZ22RDv5qbxI9Rx5962pH7TG0eAAN/sEnY8i1MCXr7Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678332178; a=rsa-sha256; cv=none; b=MMEroDptMf7LfxBMmRScGvSzV9jecIwmHF7vL7z7UeNC2o8N3m4cfi//BztouYGdmax01I scPgWKd+Xj4J/4dwHmKuYLGG+JqoZxU9CPvr3OqoRvgHA0SQ2qsPKsQz4CxENHRVKo5kTB kvTem5VeEkqk6cC1AQ0W1lxx5/hzStnBr+AlJ7fp67MS7Zs3uJhFHmeZjgg0UlGbJXDVln XOxoEfCj8+Y6kBPbIUDl2NGlOKFc793rFuIKHALkNy+Ea5COey7eNo1mK1fsrkoDl5d3rb Ba09U13Cicu6Yty3y5DWiQ/IHPZE5Bhvqyc6ypS90UaWIdhFX1jaQLWXDs/9Ww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PXDyn6ffxzrJd; Thu, 9 Mar 2023 03:22:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3293MvtI031196; Thu, 9 Mar 2023 03:22:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3293MvBJ031195; Thu, 9 Mar 2023 03:22:57 GMT (envelope-from git) Date: Thu, 9 Mar 2023 03:22:57 GMT Message-Id: <202303090322.3293MvBJ031195@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Charlie Li Subject: git: 1e9c9994ae53 - main - Tools/scripts: add strip_RECORD.py List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vishwin X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e9c9994ae538c009fc0f6ad05da4e1789885a4c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by vishwin: URL: https://cgit.FreeBSD.org/ports/commit/?id=1e9c9994ae538c009fc0f6ad05da4e1789885a4c commit 1e9c9994ae538c009fc0f6ad05da4e1789885a4c Author: Charlie Li AuthorDate: 2023-03-09 02:06:24 +0000 Commit: Charlie Li CommitDate: 2023-03-09 03:20:24 +0000 Tools/scripts: add strip_RECORD.py Strips/prints only the first column of a Python wheel's RECORD file. To be used as part of the USE_PYTHON=autoplist process. --- Tools/scripts/README | 1 + Tools/scripts/strip_RECORD.py | 46 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/Tools/scripts/README b/Tools/scripts/README index 8dfb2b17028a..e1d56e4911dd 100644 --- a/Tools/scripts/README +++ b/Tools/scripts/README @@ -39,6 +39,7 @@ search_lib_depends_and_bump.sh - Give it a port that has changed and it will bum all ports having a LIB_DEPENDS on this port splitpatch.pl - A small script to convert multi-file patches to several appropriately named single-file patches. +strip_RECORD.py - strips/prints only the first column of a Python wheel's RECORD file tindex - script used to build INDEXes for supported FreeBSD branches, which are the source of the 'make fetchindex' INDEXes, and the build failure reports on ports@FreeBSD.org diff --git a/Tools/scripts/strip_RECORD.py b/Tools/scripts/strip_RECORD.py new file mode 100644 index 000000000000..abeff3b8b971 --- /dev/null +++ b/Tools/scripts/strip_RECORD.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# +# SPDX-License-Identifier: BSD-3-Clause +# +# Copyright 2023 Charlie Li +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# MAINTAINER= python@FreeBSD.org + +import argparse +import csv + +argparser = argparse.ArgumentParser(description="Strip other columns from RECORD.") +argparser.add_argument('file', type=open, help="path to RECORD file") +args = argparser.parse_args() + +csvreader = csv.reader(args.file) +for row in csvreader: + print(row[0])