From patchwork Wed Aug 23 14:29:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Jarry X-Patchwork-Id: 1824740 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Gvvpp4Bz; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.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 4RW8G40PlJz1ygy for ; Thu, 24 Aug 2023 00:47:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 65BD5612C1; Wed, 23 Aug 2023 14:47:53 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 65BD5612C1 Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Gvvpp4Bz X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u7q9xpAVffOV; Wed, 23 Aug 2023 14:47:52 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 041D761283; Wed, 23 Aug 2023 14:47:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 041D761283 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D4125C0DD5; Wed, 23 Aug 2023 14:47:49 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id C32DBC0DD5 for ; Wed, 23 Aug 2023 14:47:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8A58B820B0 for ; Wed, 23 Aug 2023 14:47:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8A58B820B0 Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Gvvpp4Bz X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V6wS5sUHNhvr for ; Wed, 23 Aug 2023 14:47:47 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 46CF581858 for ; Wed, 23 Aug 2023 14:47:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 46CF581858 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692802066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Hwb6zu3rcbA53Z2sb2lDGjc/+QJQPqLpoHJZYeG6kOA=; b=Gvvpp4Bzra7DXcNAK8CcoJmxanGMdaisXf3mJ6nTsKbJ8bjKvk4/amB0xt0mLLT6HTh93A iRXGjAZ+/F9eckqXbFag1AqgEZdo3TfdiQdT38u9VlkJ+xOTgQkuc+0PF6FdV2vb792q+e KxlxF90tyuI6fmQqnwlhBwE08FgJxfI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-73-eqaJJqe_PnWDDdqKoPGizw-1; Wed, 23 Aug 2023 10:47:44 -0400 X-MC-Unique: eqaJJqe_PnWDDdqKoPGizw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2232C85C70D for ; Wed, 23 Aug 2023 14:47:44 +0000 (UTC) Received: from ringo.home (unknown [10.39.208.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 64C852026D76; Wed, 23 Aug 2023 14:47:43 +0000 (UTC) From: Robin Jarry To: dev@openvswitch.org Date: Wed, 23 Aug 2023 16:29:00 +0200 Message-ID: <20230823144736.480791-2-rjarry@redhat.com> In-Reply-To: <20230823144736.480791-1-rjarry@redhat.com> References: <20230823144736.480791-1-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v2 1/3] python: Rename build related code to ovs_build_helpers. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" The python/build folder contents are completely unrelated to the ovs python bindings. These files are only used during the build for various subsystems (docs, man pages, code generation, etc.). Having that folder in that location prevents from running: cd python && python3 -m build Which is a way to generate PEP517 compatible source archives and binary wheel packages. Rename that folder to ovs_build_helpers which is more explicit. Update all imports accordingly. Link: https://peps.python.org/pep-0517/ Link: https://pypi.org/project/build/ Signed-off-by: Robin Jarry --- Makefile.am | 2 +- build-aux/extract-ofp-fields | 12 ++++++------ build-aux/gen_ofp_field_decoders | 4 ++-- build-aux/sodepends.py | 3 ++- build-aux/soexpand.py | 3 ++- build-aux/xml2nroff | 10 +++++----- ovsdb/ovsdb-doc | 2 +- python/automake.mk | 16 ++++++++-------- python/{build => ovs_build_helpers}/__init__.py | 0 .../extract_ofp_fields.py | 0 python/{build => ovs_build_helpers}/nroff.py | 0 python/{build => ovs_build_helpers}/soutil.py | 0 12 files changed, 27 insertions(+), 25 deletions(-) rename python/{build => ovs_build_helpers}/__init__.py (100%) rename python/{build => ovs_build_helpers}/extract_ofp_fields.py (100%) rename python/{build => ovs_build_helpers}/nroff.py (100%) rename python/{build => ovs_build_helpers}/soutil.py (100%) diff --git a/Makefile.am b/Makefile.am index db341504d37f..52c5d6e33a17 100644 --- a/Makefile.am +++ b/Makefile.am @@ -415,7 +415,7 @@ endif CLEANFILES += flake8-check -include manpages.mk -manpages.mk: $(MAN_ROOTS) build-aux/sodepends.py python/build/soutil.py +manpages.mk: $(MAN_ROOTS) build-aux/sodepends.py python/ovs_build_helpers/soutil.py @PYTHONPATH=$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) $(MAN_ROOTS) >$(@F).tmp @if cmp -s $(@F).tmp $@; then \ touch $@; \ diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields index efec59c25b35..5b58f4454694 100755 --- a/build-aux/extract-ofp-fields +++ b/build-aux/extract-ofp-fields @@ -4,9 +4,9 @@ import getopt import sys import os.path import xml.dom.minidom -import build.nroff -from build.extract_ofp_fields import ( +from ovs_build_helpers import nroff +from ovs_build_helpers.extract_ofp_fields import ( extract_ofp_fields, PREREQS, OXM_CLASSES, @@ -297,7 +297,7 @@ l lx. body += [".TE\n"] body += [".PP\n"] - body += [build.nroff.block_xml_to_nroff(field_node.childNodes)] + body += [nroff.block_xml_to_nroff(field_node.childNodes)] def group_xml_to_nroff(group_node, fields): @@ -310,11 +310,11 @@ def group_xml_to_nroff(group_node, fields): id_ = node.attributes["id"].nodeValue field_to_xml(node, fields[id_], body, summary) else: - body += [build.nroff.block_xml_to_nroff([node])] + body += [nroff.block_xml_to_nroff([node])] content = [ ".bp\n", - '.SH "%s"\n' % build.nroff.text_to_nroff(title.upper() + " FIELDS"), + '.SH "%s"\n' % nroff.text_to_nroff(title.upper() + " FIELDS"), '.SS "Summary:"\n', ".TS\n", "tab(;);\n", @@ -422,7 +422,7 @@ ovs\-fields \- protocol header fields in OpenFlow and Open vSwitch elif node.nodeType == node.COMMENT_NODE: pass else: - s += build.nroff.block_xml_to_nroff([node]) + s += nroff.block_xml_to_nroff([node]) for f in fields: if "used" not in f: diff --git a/build-aux/gen_ofp_field_decoders b/build-aux/gen_ofp_field_decoders index 0b797ee8c8c1..0cb6108c2223 100755 --- a/build-aux/gen_ofp_field_decoders +++ b/build-aux/gen_ofp_field_decoders @@ -2,7 +2,7 @@ import argparse -import build.extract_ofp_fields as extract_fields +from ovs_build_helpers.extract_ofp_fields import extract_ofp_fields def main(): @@ -19,7 +19,7 @@ def main(): args = parser.parse_args() - fields = extract_fields.extract_ofp_fields(args.metaflow) + fields = extract_ofp_fields(args.metaflow) field_decoders = {} aliases = {} diff --git a/build-aux/sodepends.py b/build-aux/sodepends.py index 45812bcbd700..ac8dd61a4b2f 100755 --- a/build-aux/sodepends.py +++ b/build-aux/sodepends.py @@ -14,9 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -from build import soutil import sys +from ovs_build_helpers import soutil + def sodepends(include_dirs, filenames, dst): ok = True diff --git a/build-aux/soexpand.py b/build-aux/soexpand.py index 00adcf47a356..7d4dc0486a9a 100755 --- a/build-aux/soexpand.py +++ b/build-aux/soexpand.py @@ -14,9 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -from build import soutil import sys +from ovs_build_helpers import soutil + def soexpand(include_dirs, src, dst): ok = True diff --git a/build-aux/xml2nroff b/build-aux/xml2nroff index ee5553f4564e..3e937910bed1 100755 --- a/build-aux/xml2nroff +++ b/build-aux/xml2nroff @@ -18,7 +18,7 @@ import getopt import sys import xml.dom.minidom -import build.nroff +from ovs_build_helpers import nroff argv0 = sys.argv[0] @@ -90,10 +90,10 @@ def manpage_to_nroff(xml_file, subst, include_path, version=None): . I "\\$1" . RE .. -''' % (build.nroff.text_to_nroff(program), build.nroff.text_to_nroff(section), - build.nroff.text_to_nroff(title), build.nroff.text_to_nroff(version)) +''' % (nroff.text_to_nroff(program), nroff.text_to_nroff(section), + nroff.text_to_nroff(title), nroff.text_to_nroff(version)) - s += build.nroff.block_xml_to_nroff(doc.childNodes) + "\n" + s += nroff.block_xml_to_nroff(doc.childNodes) + "\n" return s @@ -139,7 +139,7 @@ if __name__ == "__main__": try: s = manpage_to_nroff(args[0], subst, include_path, version) - except build.nroff.error.Error as e: + except nroff.error.Error as e: sys.stderr.write("%s: %s\n" % (argv0, e.msg)) sys.exit(1) for line in s.splitlines(): diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc index 10d0c0c13430..099770d253f6 100755 --- a/ovsdb/ovsdb-doc +++ b/ovsdb/ovsdb-doc @@ -24,7 +24,7 @@ import ovs.json from ovs.db import error import ovs.db.schema -from build.nroff import * +from ovs_build_helpers.nroff import * argv0 = sys.argv[0] diff --git a/python/automake.mk b/python/automake.mk index 82a50878741a..6c7ac84b9c40 100644 --- a/python/automake.mk +++ b/python/automake.mk @@ -66,10 +66,10 @@ ovs_pytests = \ # These python files are used at build time but not runtime, # so they are not installed. EXTRA_DIST += \ - python/build/__init__.py \ - python/build/extract_ofp_fields.py \ - python/build/nroff.py \ - python/build/soutil.py + python/ovs_build_helpers/__init__.py \ + python/ovs_build_helpers/extract_ofp_fields.py \ + python/ovs_build_helpers/nroff.py \ + python/ovs_build_helpers/soutil.py # PyPI support. EXTRA_DIST += \ @@ -88,10 +88,10 @@ PYCOV_CLEAN_FILES += $(PYFILES:.py=.py,cover) FLAKE8_PYFILES += \ $(filter-out python/ovs/compat/% python/ovs/dirs.py,$(PYFILES)) \ - python/build/__init__.py \ - python/build/extract_ofp_fields.py \ - python/build/nroff.py \ - python/build/soutil.py \ + python/ovs_build_helpers/__init__.py \ + python/ovs_build_helpers/extract_ofp_fields.py \ + python/ovs_build_helpers/nroff.py \ + python/ovs_build_helpers/soutil.py \ python/ovs/dirs.py.template \ python/setup.py diff --git a/python/build/__init__.py b/python/ovs_build_helpers/__init__.py similarity index 100% rename from python/build/__init__.py rename to python/ovs_build_helpers/__init__.py diff --git a/python/build/extract_ofp_fields.py b/python/ovs_build_helpers/extract_ofp_fields.py similarity index 100% rename from python/build/extract_ofp_fields.py rename to python/ovs_build_helpers/extract_ofp_fields.py diff --git a/python/build/nroff.py b/python/ovs_build_helpers/nroff.py similarity index 100% rename from python/build/nroff.py rename to python/ovs_build_helpers/nroff.py diff --git a/python/build/soutil.py b/python/ovs_build_helpers/soutil.py similarity index 100% rename from python/build/soutil.py rename to python/ovs_build_helpers/soutil.py From patchwork Wed Aug 23 14:29:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Jarry X-Patchwork-Id: 1824742 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=E46x0w+h; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 4RW8G76qvhz1yg8 for ; Thu, 24 Aug 2023 00:47:59 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 7D5F140CA8; Wed, 23 Aug 2023 14:47:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 7D5F140CA8 Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=E46x0w+h X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qESmw1X_VxB8; Wed, 23 Aug 2023 14:47:54 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 62CA740C2A; Wed, 23 Aug 2023 14:47:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 62CA740C2A Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id AA676C0DDA; Wed, 23 Aug 2023 14:47:50 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1ED31C0DD5 for ; Wed, 23 Aug 2023 14:47:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id ED71540597 for ; Wed, 23 Aug 2023 14:47:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org ED71540597 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xkeKGFKPziZu for ; Wed, 23 Aug 2023 14:47:48 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id E28E640124 for ; Wed, 23 Aug 2023 14:47:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org E28E640124 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692802066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qFhlV1NyMNmRpqnxiYk0HFiVEZghPgsHPQ1IjfM7b/M=; b=E46x0w+h1J9l+SXVR+FhE6qoB50NxLXMVSBUD+Ui/FJanD5JROMJU48D+c4wsCKGLsYarf A8Spv2pvuDgBJsPq0jm5egmmjzThZdl/R17teLIUvIsQ1N2ceI+1rJrhezoyeYQkn1w5o1 g1ag78MlxMcifUnPod8zQs9g2CNPJd0= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-482-ZqZmkNtBNaGhK957EJd2qg-1; Wed, 23 Aug 2023 10:47:45 -0400 X-MC-Unique: ZqZmkNtBNaGhK957EJd2qg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 45A191C06922 for ; Wed, 23 Aug 2023 14:47:45 +0000 (UTC) Received: from ringo.home (unknown [10.39.208.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 715BE2026D76; Wed, 23 Aug 2023 14:47:44 +0000 (UTC) From: Robin Jarry To: dev@openvswitch.org Date: Wed, 23 Aug 2023 16:29:01 +0200 Message-ID: <20230823144736.480791-3-rjarry@redhat.com> In-Reply-To: <20230823144736.480791-1-rjarry@redhat.com> References: <20230823144736.480791-1-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v2 2/3] python: Use twine to upload sdist package to pypi.org. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" setup.py upload is now deprecated. When used, pypi.org returns an error: Upload failed (400): Invalid value for blake2_256_digest. Error: Use a valid, hex-encoded, BLAKE2 message digest. Use twine which is the recommended replacement tool to upload on pypi.org. Link: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary Reported-by: Terry Wilson Signed-off-by: Robin Jarry --- python/automake.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/automake.mk b/python/automake.mk index 6c7ac84b9c40..d9f6803691d7 100644 --- a/python/automake.mk +++ b/python/automake.mk @@ -112,11 +112,14 @@ ovs-install-data-local: $(INSTALL_DATA) python/ovs/dirs.py.tmp $(DESTDIR)$(pkgdatadir)/python/ovs/dirs.py rm python/ovs/dirs.py.tmp +.PHONY: python-sdist python-sdist: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py (cd python/ && $(PYTHON3) setup.py sdist) -pypi-upload: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py - (cd python/ && $(PYTHON3) setup.py sdist upload) +.PHONY: pypi-upload +pypi-upload: python-sdist + twine upload python/dist/ovs-$(VERSION).tar.gz + install-data-local: ovs-install-data-local UNINSTALL_LOCAL += ovs-uninstall-local From patchwork Wed Aug 23 14:29:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Jarry X-Patchwork-Id: 1824741 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hi0uhka8; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.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 4RW8G65PSxz1yg8 for ; Thu, 24 Aug 2023 00:47:58 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3571C61283; Wed, 23 Aug 2023 14:47:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3571C61283 Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hi0uhka8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fGGdnDOpJ1cW; Wed, 23 Aug 2023 14:47:55 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 18E48612C4; Wed, 23 Aug 2023 14:47:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 18E48612C4 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A6C59C0DD3; Wed, 23 Aug 2023 14:47:51 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 162D5C007F for ; Wed, 23 Aug 2023 14:47:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2D51740B16 for ; Wed, 23 Aug 2023 14:47:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2D51740B16 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hi0uhka8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id izyy-8VHXNqJ for ; Wed, 23 Aug 2023 14:47:49 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 34C2540124 for ; Wed, 23 Aug 2023 14:47:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 34C2540124 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692802068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K2T+dXFdtjmdI9JQffO7JdGSXDLm5xj8+0N3fgLsbn4=; b=hi0uhka8VQVDdBpSl4TV7Tnxvgw1PgCl3d1YZ1BGAvIzyw6EbRLCxrRgiAcnhqxKXRbXcO TKO0dMlhNzsUSD2PuXp6qa/2UNKaeJO5XIHPx8p095gWIFq8tceA0BxOAHNRtNhGtn+Uy6 18DfhBG/SDDq8nP0BluhNyu5lik5ueQ= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-464-I_4ZjCA9OHWFYbsoDqVs1Q-1; Wed, 23 Aug 2023 10:47:46 -0400 X-MC-Unique: I_4ZjCA9OHWFYbsoDqVs1Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 395CB299E75E for ; Wed, 23 Aug 2023 14:47:46 +0000 (UTC) Received: from ringo.home (unknown [10.39.208.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8F6BA2026D76; Wed, 23 Aug 2023 14:47:45 +0000 (UTC) From: Robin Jarry To: dev@openvswitch.org Date: Wed, 23 Aug 2023 16:29:02 +0200 Message-ID: <20230823144736.480791-4-rjarry@redhat.com> In-Reply-To: <20230823144736.480791-1-rjarry@redhat.com> References: <20230823144736.480791-1-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v2 3/3] python: Use build to generate PEP517 compatible archives. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Quoting Paul Ganssle, setuptools maintainer: * The setuptools project has stopped maintaining all direct invocations of setup.py years ago, and distutils is deprecated. There are undoubtedly many ways that your setup.py-based system is broken today, even if it's not failing loudly or obviously. * Direct invocations of setup.py cannot bootstrap their own dependencies, and so some CLI is necessary for dependency management. * The setuptools project no longer wants to provide any public CLI, and will be actively removing the existing interface (though the time scale for this is long). * PEP 517, 518 and other standards-based packaging are the future of the Python ecosystem and a lot of progress has been made on making this upgrade seamless. As described in the recommendations in the end of the article: `python3 setup.py sdist` should be replaced by `python3 -m build --sdist`. Link: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary Signed-off-by: Robin Jarry --- python/automake.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/automake.mk b/python/automake.mk index d9f6803691d7..84cf2eab57e8 100644 --- a/python/automake.mk +++ b/python/automake.mk @@ -114,7 +114,7 @@ ovs-install-data-local: .PHONY: python-sdist python-sdist: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py - (cd python/ && $(PYTHON3) setup.py sdist) + cd python/ && $(PYTHON3) -m build --sdist .PHONY: pypi-upload pypi-upload: python-sdist