From patchwork Wed Aug 2 08:27:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Jarry X-Patchwork-Id: 1815848 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=) 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=Qe7Vp8SO; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RG4vL4JHTz1yZl for ; Wed, 2 Aug 2023 18:31:25 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 4F9D241462; Wed, 2 Aug 2023 08:31:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 4F9D241462 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=Qe7Vp8SO 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 bj3z5X5iFhnn; Wed, 2 Aug 2023 08:31:17 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 7612B40465; Wed, 2 Aug 2023 08:31:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 7612B40465 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 69A5CC0DD7; Wed, 2 Aug 2023 08:31:13 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 39DF7C0072 for ; Wed, 2 Aug 2023 08:31:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0485F4181E for ; Wed, 2 Aug 2023 08:31:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0485F4181E Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Qe7Vp8SO X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FNLSbUas0B5V for ; Wed, 2 Aug 2023 08:31:10 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 0C5FA408AD for ; Wed, 2 Aug 2023 08:31:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0C5FA408AD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690965068; 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=hr+zfd8o1iOO3urCMnQzTjb1WR5Kh+9qluAHVMJMtLU=; b=Qe7Vp8SOkLJ04/XLzKloakrcva0Roi9ZenUad3+7buzeB4m1hjpRh00flULHetkh7Nm9k/ pUvVfwNkubrqaasyTvzG6DvcDCC7rO9v4eR5wGaiCPy/x+hRpVqC65EbopWBIZZepHbsvT NfqdwrVNPcuyyAmcbXBQ/u0woXpEHn4= 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-377-X7KmblpXPgWCuuXVxARZLg-1; Wed, 02 Aug 2023 04:31:07 -0400 X-MC-Unique: X7KmblpXPgWCuuXVxARZLg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E61FC28EC110 for ; Wed, 2 Aug 2023 08:31:06 +0000 (UTC) Received: from ringo.home (unknown [10.39.208.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 445101121325; Wed, 2 Aug 2023 08:31:06 +0000 (UTC) From: Robin Jarry To: dev@openvswitch.org Date: Wed, 2 Aug 2023 10:27:22 +0200 Message-ID: <20230802083058.67766-2-rjarry@redhat.com> In-Reply-To: <20230802083058.67766-1-rjarry@redhat.com> References: <20230802083058.67766-1-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH 1/3] python: Move build related code into build-aux. 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. Move that folder into build-aux. Update PYTHONPATH accordingly. Link: https://peps.python.org/pep-0517/ Link: https://pypi.org/project/build/ Signed-off-by: Robin Jarry Acked-by: Mike Pattrick --- Makefile.am | 6 +++--- build-aux/automake.mk | 8 ++++++++ {python => build-aux}/build/__init__.py | 0 {python => build-aux}/build/extract_ofp_fields.py | 0 {python => build-aux}/build/nroff.py | 0 {python => build-aux}/build/soutil.py | 0 python/automake.mk | 12 ------------ 7 files changed, 11 insertions(+), 15 deletions(-) rename {python => build-aux}/build/__init__.py (100%) rename {python => build-aux}/build/extract_ofp_fields.py (100%) rename {python => build-aux}/build/nroff.py (100%) rename {python => build-aux}/build/soutil.py (100%) diff --git a/Makefile.am b/Makefile.am index db341504d37f..fca138ea9fd6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -58,7 +58,7 @@ endif # foo/__init__.py into an (older) version with plain foo.py, since # foo/__init__.pyc will cause Python to ignore foo.py. run_python = \ - PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \ + PYTHONPATH=$(top_srcdir)/python$(psep)$(top_srcdir)/build-aux$(psep)$$PYTHONPATH \ PYTHONDONTWRITEBYTECODE=yes $(PYTHON3) ALL_LOCAL = @@ -151,7 +151,7 @@ ro_shell = printf '\043 Generated automatically -- do not modify! -*- buffer- SUFFIXES += .in .in: - $(AM_V_GEN)PYTHONPATH=$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/soexpand.py -I$(srcdir) < $< | \ + $(AM_V_GEN)$(PYTHON3) $(srcdir)/build-aux/soexpand.py -I$(srcdir) < $< | \ $(PYTHON3) $(srcdir)/build-aux/dpdkstrip.py $(DPDKSTRIP_FLAGS) | \ sed \ -e 's,[@]PKIDIR[@],$(PKIDIR),g' \ @@ -416,7 +416,7 @@ CLEANFILES += flake8-check -include manpages.mk manpages.mk: $(MAN_ROOTS) build-aux/sodepends.py python/build/soutil.py - @PYTHONPATH=$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) $(MAN_ROOTS) >$(@F).tmp + @$(PYTHON3) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) $(MAN_ROOTS) >$(@F).tmp @if cmp -s $(@F).tmp $@; then \ touch $@; \ rm -f $(@F).tmp; \ diff --git a/build-aux/automake.mk b/build-aux/automake.mk index b9a77a51cfed..b4426d7b23dd 100644 --- a/build-aux/automake.mk +++ b/build-aux/automake.mk @@ -1,4 +1,8 @@ EXTRA_DIST += \ + build-aux/build/__init__.py \ + build-aux/build/extract_ofp_fields.py \ + build-aux/build/nroff.py \ + build-aux/build/soutil.py \ build-aux/calculate-schema-cksum \ build-aux/cccl \ build-aux/cksum-schema-check \ @@ -13,6 +17,10 @@ EXTRA_DIST += \ build-aux/xml2nroff FLAKE8_PYFILES += \ + build-aux/build/__init__.py \ + build-aux/build/extract_ofp_fields.py \ + build-aux/build/nroff.py \ + build-aux/build/soutil.py \ build-aux/dpdkstrip.py \ build-aux/gen_ofp_field_decoders \ build-aux/sodepends.py \ diff --git a/python/build/__init__.py b/build-aux/build/__init__.py similarity index 100% rename from python/build/__init__.py rename to build-aux/build/__init__.py diff --git a/python/build/extract_ofp_fields.py b/build-aux/build/extract_ofp_fields.py similarity index 100% rename from python/build/extract_ofp_fields.py rename to build-aux/build/extract_ofp_fields.py diff --git a/python/build/nroff.py b/build-aux/build/nroff.py similarity index 100% rename from python/build/nroff.py rename to build-aux/build/nroff.py diff --git a/python/build/soutil.py b/build-aux/build/soutil.py similarity index 100% rename from python/build/soutil.py rename to build-aux/build/soutil.py diff --git a/python/automake.mk b/python/automake.mk index 82a50878741a..8b6266de214e 100644 --- a/python/automake.mk +++ b/python/automake.mk @@ -63,14 +63,6 @@ ovs_pytests = \ python/ovs/tests/test_odp.py \ python/ovs/tests/test_ofp.py -# 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 - # PyPI support. EXTRA_DIST += \ python/ovs/compat/sortedcontainers/LICENSE \ @@ -88,10 +80,6 @@ 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/dirs.py.template \ python/setup.py From patchwork Wed Aug 2 08:27:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Jarry X-Patchwork-Id: 1815847 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=) 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=TB2G4Faj; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RG4vJ1P6Pz1ydw for ; Wed, 2 Aug 2023 18:31:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id D833F611E6; Wed, 2 Aug 2023 08:31:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D833F611E6 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=TB2G4Faj 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 89b_Pg964UT4; Wed, 2 Aug 2023 08:31:19 +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 87862611BD; Wed, 2 Aug 2023 08:31:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 87862611BD Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 01F5BC0DDA; Wed, 2 Aug 2023 08:31:17 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 57C90C0DD2 for ; Wed, 2 Aug 2023 08:31:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3A56340106 for ; Wed, 2 Aug 2023 08:31:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3A56340106 Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TB2G4Faj X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NiEwnSJLUEon for ; Wed, 2 Aug 2023 08:31:11 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id C9BF94182C for ; Wed, 2 Aug 2023 08:31:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org C9BF94182C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690965069; 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=aljbry56gC2GGfPLHE1hkzE130gOoda4IvOnV6fW6tg=; b=TB2G4FajYnDl1AuPisdcE6foEj2NLcN0m07sHBkln32Si02d6Fs89+zrdzHeB3MI/Ti77a S9lJaXVDMOoWTJI6Xv1umx0+xYk/XMaxmuvvVuXlE+qBAAdl4iD+wycFrO7AJ9FDIr7Cnw Qfhx36ENO6z6VFb1cAupLDyTwoCegyk= 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-636-7lMEn9uKNu68IG0KpGiXRg-1; Wed, 02 Aug 2023 04:31:08 -0400 X-MC-Unique: 7lMEn9uKNu68IG0KpGiXRg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 15D5A3811F2B for ; Wed, 2 Aug 2023 08:31:08 +0000 (UTC) Received: from ringo.home (unknown [10.39.208.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E52F1121325; Wed, 2 Aug 2023 08:31:07 +0000 (UTC) From: Robin Jarry To: dev@openvswitch.org Date: Wed, 2 Aug 2023 10:27:23 +0200 Message-ID: <20230802083058.67766-3-rjarry@redhat.com> In-Reply-To: <20230802083058.67766-1-rjarry@redhat.com> References: <20230802083058.67766-1-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH 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 Acked-by: Mike Pattrick --- python/automake.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/automake.mk b/python/automake.mk index 8b6266de214e..8854e656a5ae 100644 --- a/python/automake.mk +++ b/python/automake.mk @@ -104,7 +104,7 @@ 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) + (cd python/ && $(PYTHON3) setup.py sdist && twine upload dist/ovs-$(VERSION).tar.gz) install-data-local: ovs-install-data-local UNINSTALL_LOCAL += ovs-uninstall-local From patchwork Wed Aug 2 08:27:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Jarry X-Patchwork-Id: 1815849 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) 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=Nq/e4ZZf; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RG4vP5JHwz20G4 for ; Wed, 2 Aug 2023 18:31:29 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9069241450; Wed, 2 Aug 2023 08:31:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9069241450 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=Nq/e4ZZf 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 D-oFxTAMdpmu; Wed, 2 Aug 2023 08:31:18 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id E8C2C40445; Wed, 2 Aug 2023 08:31:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org E8C2C40445 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 40E41C0DD3; Wed, 2 Aug 2023 08:31:16 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id DCF14C0DD2 for ; Wed, 2 Aug 2023 08:31:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 9C6F7813FE for ; Wed, 2 Aug 2023 08:31:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 9C6F7813FE 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=Nq/e4ZZf 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 P7TwZnLfFzvm for ; Wed, 2 Aug 2023 08:31:11 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id A0388813F6 for ; Wed, 2 Aug 2023 08:31:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A0388813F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690965070; 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=NjJCm4NeXcWDzVZ0gnw+tP3VzSIpxbRW4DN5GyfUSI0=; b=Nq/e4ZZf+Pfq4xBIHOQ2EoQn4V3VY+Z6hDbs01JYtpzJ1R0c9O6hQI+9v+KbgKHFUS0jtK qlfxRy8f6GlO3JrknW21vGHyYO9M6Z+B4FjvKQxg6rsPRSbB+CvS2uHnfKaZCCImK2zzMT X4+u7jxWYYERQwzqStl+Z42QJVC0THU= 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-194-NIT9_46jMOiRPNqI6x4h8Q-1; Wed, 02 Aug 2023 04:31:09 -0400 X-MC-Unique: NIT9_46jMOiRPNqI6x4h8Q-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 161603811F3A for ; Wed, 2 Aug 2023 08:31:09 +0000 (UTC) Received: from ringo.home (unknown [10.39.208.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69F9F1121330; Wed, 2 Aug 2023 08:31:08 +0000 (UTC) From: Robin Jarry To: dev@openvswitch.org Date: Wed, 2 Aug 2023 10:27:24 +0200 Message-ID: <20230802083058.67766-4-rjarry@redhat.com> In-Reply-To: <20230802083058.67766-1-rjarry@redhat.com> References: <20230802083058.67766-1-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH 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 Acked-by: Mike Pattrick --- python/automake.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/automake.mk b/python/automake.mk index 8854e656a5ae..19d9d91119c2 100644 --- a/python/automake.mk +++ b/python/automake.mk @@ -101,10 +101,11 @@ ovs-install-data-local: rm python/ovs/dirs.py.tmp 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 pypi-upload: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py - (cd python/ && $(PYTHON3) setup.py sdist && twine upload dist/ovs-$(VERSION).tar.gz) + cd python/ && $(PYTHON3) -m build --sdist && twine upload dist/ovs-$(VERSION).tar.gz + install-data-local: ovs-install-data-local UNINSTALL_LOCAL += ovs-uninstall-local