From nobody Sun Nov 27 18:25:22 2022
X-Original-To: python@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 4NKxq71D4hz4jRT9
	for <python@mlmmj.nyi.freebsd.org>; Sun, 27 Nov 2022 18:25:23 +0000 (UTC)
	(envelope-from bugzilla-noreply@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 4NKxq669jsz4CN7
	for <python@FreeBSD.org>; Sun, 27 Nov 2022 18:25:22 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1669573522;
	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:
	 in-reply-to:in-reply-to:references:references;
	bh=L4dVG95GSDv6g5KrHtJBrKfQD5eEDEX8V9vDarFeoJE=;
	b=W8ogGvz1sRBdkulSh+somU3DuwjeGUzDUV17h2MBfAcilBFukCZ8fEf8UVfE0O7GvlCeja
	MjKY8ajRh67+GFXkYqctvRTc2pC/R7RxcxRpsfeT7/Pu8jYbDklcUPaqQ9bB78Tl9AwsmB
	3AGdsa2I5vtgrojbcYz9BQrFhqspnDN3L97rdus0lJt10sD/bbTm4zYv8Gjc8F2gZ4KfJw
	dY/uV2QzWHoTaMfInK1TQo330CbL9VmhfCakmt9JUNUDa8fLWrHZqA2u4TZzqdmhxGNbmR
	xDrp9pigbxtd08TLAPSXTyh+0g55PI+2GUVNxfvV68+Ow4eFbjrfv1/zOjgxYw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669573522; a=rsa-sha256; cv=none;
	b=nrc7f/P9eStxb3SUv4tcyFMLE7b4t0wmoQq0oI1kBGuzxuiF4JSVuZdp9fy6ogs3MygBn6
	5JdaPgUqn2riH6XWXIc4ayLokHvHXheBZiCwNXavx/4o15SqHIAYBj4aHG+0kCYn/Wud+x
	EvZcEe5rhvxB+5R9tMfuCntLJ6oTCwTMNyMB72zwdd5fuYs73usOn2hj8gFQ3zbVopwQZV
	zBC5dNqx2rctHj0OUam96xhtqaS7RCcZWI8VFVkQHFr3E0THzBsUj90Lqxx1Ir6NKcDF6e
	ajq204WIlphjEBxtJVcuf2Jmj0BA2ND6aWa5dXMr/E+v0nSk1gT9ReR/whkomQ==
Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d])
	(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 4NKxq65BpJz17LQ
	for <python@FreeBSD.org>; Sun, 27 Nov 2022 18:25:22 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
	by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 2ARIPMAS026996
	for <python@FreeBSD.org>; Sun, 27 Nov 2022 18:25:22 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
	by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2ARIPMVf026995
	for python@FreeBSD.org; Sun, 27 Nov 2022 18:25:22 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
From: bugzilla-noreply@freebsd.org
To: python@FreeBSD.org
Subject: maintainer-feedback requested: [Bug 268018] textproc/py-sphinx:
 Updating to 5.3.0, ensuring themes are installed, using flit and
 pyproject-build
Date: Sun, 27 Nov 2022 18:25:22 +0000
X-Bugzilla-Type: request
X-Bugzilla-Product: Ports & Packages
X-Bugzilla-Component: Individual Port(s)
X-Bugzilla-Version: Latest
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: Affects Only Me
X-Bugzilla-Who: 
X-Bugzilla-Status: New
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: python@FreeBSD.org
X-Bugzilla-Flags: maintainer-feedback?
Message-ID: <bug-268018-21822-DPIbTH84Wk@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-268018-21822@https.bugs.freebsd.org/bugzilla/>
References: <bug-268018-21822@https.bugs.freebsd.org/bugzilla/>
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
List-Id: FreeBSD-specific Python issues <freebsd-python.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-python
List-Help: <mailto:python+help@freebsd.org>
List-Post: <mailto:python@freebsd.org>
List-Subscribe: <mailto:python+subscribe@freebsd.org>
List-Unsubscribe: <mailto:python+unsubscribe@freebsd.org>
Sender: owner-freebsd-python@freebsd.org
X-BeenThere: freebsd-python@freebsd.org
MIME-Version: 1.0
X-ThisMailContainsUnwantedMimeParts: N

Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-python (Nobody)
<python@FreeBSD.org> for maintainer-feedback:
Bug 268018: textproc/py-sphinx: Updating to 5.3.0, ensuring themes are
installed, using flit and pyproject-build
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268018



--- Description ---
textproc/py-sphinx is presently available in a version 5.3.0.=20

An update for py-sphinx may be of interest when updating some ports that use
sphinx, e.g devel/py-nbclassic (if updating to 0.4.8) and devel/py-pip (if
updating to 22.3.1)

The attached diff introduces one approach to addressing the following conce=
rns,
such that might be encountered in any approach updating to 5.3.0 in py-sphi=
nx;
- Sphinx 5.3.0 uses PEP 517 conventions for the build.
- This newer build system pyrpoject.toml, rather than a setup.py
- via pyproject.toml, the upstream build then uses flit when preparing the
sources for distribution. (Contextually, this mayu be for distributions with
sdist and/or wheel archives, such that may then be published to intermediate
repositories such as PyPI)
- Using upstream conventions, the version in this updated build would be
derived from Git changelog information. This changelog information is not
available in the tar bundle downloaded from cheeseshop


In the approached presented with this patch, pyproject-build and flit are u=
sed
to prepare the sources before building with distutils.=20

The approach of using pyproject-build to prepare the sources was referenced
partly on some tooling in the Debian dh-python[1] project.=20

The distutils part of the build is referenced on the existing known-good
approaches used in FreeBSD ports.

To work around the concern about the dynamic versioning with the upstream
pyproject.toml, a new patch is introduced, along with a post-patch call to
inject a version string to pyproject.toml.=20

This version string is then available for distutils, without further
modification on the upstream sources - e.g if there was a setup.cfg ensuring
setuptools_scm would be used directly. There isn't in this project, but it
seems it was used anyway.

In this approach - mainly, in using pyproject-build and flit to prepare the
sources before building with distutils - the package will be installed with=
 all
source files, as filtered through flit, in addition to pyc files. This woul=
d be
for a given set of extensions and other configuration selected onto
pyproject.toml for the respective upstream build components (here, using fl=
it,
with no extensions in this project's pyproject.toml).=20

Maybe other projects with a pyproject.toml and no setup.py could use a simi=
lar
approach, however possibly further refined.

For this port, this approach has the effect that the sphinx themes and other
non-py sphinx resources will be installed along with the pkg.=20

Thus, the basic sphinx theme and other sphinx themes will then be available
with the updated port.

The 'basic' theme itself may be required for the docs part of some other
py-port builds - at least, after an update in each. This may include any po=
rts
using the textproc/py-sphinx-basic-ng them and thus transitively,
textproc/py-sphinx_rtd_theme

[1]
https://salsa.debian.org/python-team/tools/dh-python/-/blob/master/dhpython=
/bui
ld/plugin_pyproject.py#L105