Skip to content

Commit 0638968

Browse files
author
Matthias Koeppe
committed
src/sage/misc/cython.py: Suppress a warning caused by setuptools_scm 8
1 parent f65ae6b commit 0638968

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/sage/misc/cython.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,14 @@ def cython(filename, verbose=0, compile_message=False,
415415

416416
# This emulates running "setup.py build" with the correct options
417417
dist = Distribution()
418+
# setuptools plugins considered harmful:
419+
# If build isolation is not in use and setuptools_scm is installed,
420+
# then its file_finders entry point is invoked, which we don't need.
421+
# And with setuptools_scm 8, we get more trouble:
422+
# LookupError: pyproject.toml does not contain a tool.setuptools_scm section
423+
# LookupError: setuptools-scm was unable to detect version ...
424+
# We just remove all handling of "setuptools.finalize_distribution_options" entry points.
425+
dist._removed = staticmethod(lambda ep: True)
418426
dist.ext_modules = [ext]
419427
dist.include_dirs = includes
420428
buildcmd = dist.get_command_obj("build")

0 commit comments

Comments
 (0)