From nobody Thu Dec 09 18:58:19 2021 X-Original-To: dev-commits-ports-main@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 3085A18C61E3; Thu, 9 Dec 2021 18:58:20 +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 4J93G33LTCz4T8Q; Thu, 9 Dec 2021 18:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 402943E40; Thu, 9 Dec 2021 18:58:19 +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 1B9IwJHI045833; Thu, 9 Dec 2021 18:58:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B9IwJW0045832; Thu, 9 Dec 2021 18:58:19 GMT (envelope-from git) Date: Thu, 9 Dec 2021 18:58:19 GMT Message-Id: <202112091858.1B9IwJW0045832@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kai Knoblich Subject: git: ad7f115cddd9 - main - devel/py-setuptools_scm: Turn py-packaging into a soft dependency List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kai X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad7f115cddd949d6ffd41bd9889328c06f8906e4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639076299; 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=nc3xo5uu8xxBIyLvLYoiHB2yGB3itPWlnlXeVQOP6NI=; b=XvlnjF67YmNMyHIam9ulce3TkSG9QUquwWVDMZxmI5REivFEMzZ7sUxOAw1GjyJ8gcV1zC o6bVOTbt51+rcw6mIN7rZqVqhu5Mx5L7hVxsx/pdSyUpn7e9qy4xhbk5U6t/pNq4QygYuK g55iU4OQsNbfU/51k2xtm9bW33Xu8YmoHYhaqGbXFvMX21yJYPMAWXGQStjN5xihRG1C0I pEI1u2/CZYVOq11Ic8LBbD+FausvxRx9FMbhlhzG9rwHj5BYyMiZHin93JXMQkw+rti+XK IJthyk0xAKcNKMASQk18PKLSwWrLuJ87Cu7znwtgC9EaTMvzmkLzZPw6iMtsaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639076299; a=rsa-sha256; cv=none; b=Uj/6Oj2OjVLk2qpb471OTTJInyyT6xqVxvPaTnk+pp6I7Ggv9vi4s70b//cubCNhdV2rjG NyAGarOp0WAwjM6XBrn4NguiCwauXutynrZCMi0bN9djFC9HaAIBQaQFjvoCkQ/gfCBHj+ DgWRtGZlzZ3+utSPY8aGfTLz3x6rW19npgvwGN4WvOmbk5m9QLYY0kwhtfGYsCOtK0WhRg t1XYi6g3BH2cDeJYkk1E0CRV9gFrtTicAfc9CPXCXN+3HrJ7tq08BJ87TfAe6pS2S9PltX /s2p4GbIqT2ashwebApnLRSGk6vU1b4g3f6c/NLHj7Hte/dq9O082KywBHj2kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kai: URL: https://cgit.FreeBSD.org/ports/commit/?id=ad7f115cddd949d6ffd41bd9889328c06f8906e4 commit ad7f115cddd949d6ffd41bd9889328c06f8906e4 Author: Kai Knoblich AuthorDate: 2021-12-09 18:49:49 +0000 Commit: Kai Knoblich CommitDate: 2021-12-09 18:49:49 +0000 devel/py-setuptools_scm: Turn py-packaging into a soft dependency * Since the 6.3.0 release, devel/py-packaging has been defined in the "setup.cfg" as an unconditional dependency. However this leads to problems if py-packaging is uninstalled but py-setuptools_scm persists, then the missing port can no longer be built. [1] Although py-setuptools_scm has a fallback to devel/py-setuptools when py-packaging is absent this fallback code is not executed. This is because py-setuptools, which checks the dependencies of py-setuptools_scm upon invocation and terminates as soon as these are not met. Fix this issue by converting py-packaging into an optional dependency for py-setuptools_scm so that the fallback code is really used if py-packaging is absent. But keep the latter one in the RUN_DEPENDS in order to continue to reflect the actual dependencies. * Also add py-packaging to BUILD_DEPENDS as defined in "pyproject.toml" although it's not strictly required to build the port. [2] * Bump PORTREVISION due package change. PR: 259981 Reported by: many [1], koobs [2] Tested by: se, myself --- devel/py-setuptools_scm/Makefile | 4 +++- devel/py-setuptools_scm/files/patch-setup.cfg | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/devel/py-setuptools_scm/Makefile b/devel/py-setuptools_scm/Makefile index 58a5c111ad98..ed38105484b9 100644 --- a/devel/py-setuptools_scm/Makefile +++ b/devel/py-setuptools_scm/Makefile @@ -1,5 +1,6 @@ PORTNAME= setuptools_scm PORTVERSION= 6.3.2 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -10,7 +11,8 @@ COMMENT= Setuptools plugin to manage your versions by scm tags LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tomli>=1.0.0:textproc/py-tomli@${PY_FLAVOR} +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}packaging>=20.0:devel/py-packaging@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}tomli>=1.0.0:textproc/py-tomli@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}packaging>=20.0:devel/py-packaging@${PY_FLAVOR} TEST_DEPENDS= git:devel/git \ ${PY_MERCURIAL} \ diff --git a/devel/py-setuptools_scm/files/patch-setup.cfg b/devel/py-setuptools_scm/files/patch-setup.cfg new file mode 100644 index 000000000000..023b8f628e4d --- /dev/null +++ b/devel/py-setuptools_scm/files/patch-setup.cfg @@ -0,0 +1,19 @@ +Avoid errors during runtime if devel/py-packaging is not present. + +The package is only required in "_version_cls.py" and falls back to +devel/py-setuptools (via "try ... except") if it's not available. + +This is a workaround to remedy issues with upgrade runs that also update +devel/py-{packaging,pyparsing} in environments where devel/py-setuptools_scm is +already present. + +--- setup.cfg.orig 2021-12-05 20:43:43 UTC ++++ setup.cfg +@@ -27,7 +27,6 @@ classifiers = + [options] + packages = find: + install_requires = +- packaging>=20.0 + setuptools + tomli>=1.0.0 # keep in sync + python_requires = >=3.6