aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2025-09-03 13:09:23 +0000
committerMatthias Andree <mandree@FreeBSD.org>2025-09-03 14:07:10 +0000
commit17cf32c577055899a1827b3aea248c6d71a949b4 (patch)
tree7c0295afeb621c70240765739237a96be44bcd81
parent15ab0cc42a62629d48e6ca189958474d22a89e4e (diff)
devel/py-setuptools-scm: Heed GIT_CEILING_DIRECTORIES
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283098 introduced GIT_CEILING_DIRECTORIES=${WRKDIR} so that Python port builds do not ascend up and start looking at our entire ports tree, which is usually unrelated. The upstream setuptools-scm package as of 8.0.4 deliberately breaks this and strips all GIT_* environment variables except three, and this will lead to "git archive" that it calls when looking up extra requisites for building a wheel in the entire ports tree again. Note the bug will not be observed if either WRKDIR is outside of PORTSDIR's hierarchy (in poudriere, say), or for builds of ports if py-setuptools-scm aren't installed. Add GIT_CEILING_DIRECTORIES to the list of variables to keep so that https://cgit.freebsd.org/ports/commit/?id=deb79782a9b87c64d06441e4bf67e46bf19c45c3 continues to work even if setuptools-scm is installed and WRKDIR is a subdirectory of PORTSDIR. This is an interim fix until we receive the upstream fix, which requires a new release: https://github.com/pypa/setuptools-scm/commit/98b70785ab99ee32b6863c32d0fc844cd2c3dd95 PR: 289273 Fixes: deb79782a9b87c64d06441e4bf67e46bf19c45c3 Approved by: python@ (maintainer, vishwin@) MFH: 2025Q3 (cherry picked from commit 9ed2f48707ea779576bca72418b8c4f7cdc01df8)
-rw-r--r--devel/py-setuptools-scm/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/devel/py-setuptools-scm/Makefile b/devel/py-setuptools-scm/Makefile
index 15593bde3cf3..f0949b0f01ca 100644
--- a/devel/py-setuptools-scm/Makefile
+++ b/devel/py-setuptools-scm/Makefile
@@ -1,6 +1,6 @@
PORTNAME= setuptools-scm
PORTVERSION= 8.0.4
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -45,5 +45,6 @@ PYTEST_IGNORED_TESTS= test_dump_version_on_old_python \
post-patch:
@${REINPLACE_CMD} -e '497,521s|"gpg|"gpg2|' ${WRKSRC}/testing/test_git.py
+ @${REINPLACE_CMD} -e 's/"GIT_SSH", "GIT_SSH_COMMAND"/"GIT_SSH", "GIT_SSH_COMMAND", "GIT_CEILING_DIRECTORIES"/' ${WRKSRC}/src/setuptools_scm/_run_cmd.py
.include <bsd.port.mk>