Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/sage/misc/cython.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,15 +421,20 @@ def cython(filename, verbose=0, compile_message=False,
os.curdir)

# This emulates running "setup.py build" with the correct options
dist = Distribution()
#
# setuptools plugins considered harmful:
# If build isolation is not in use and setuptools_scm is installed,
# then its file_finders entry point is invoked, which we don't need.
# And with setuptools_scm 8, we get more trouble:
# LookupError: pyproject.toml does not contain a tool.setuptools_scm section
# LookupError: setuptools-scm was unable to detect version ...
# We just remove all handling of "setuptools.finalize_distribution_options" entry points.
dist._removed = staticmethod(lambda ep: True)
class Distribution_no_finalize_distribution_options(Distribution):
@staticmethod
def _removed(ep):
return True

dist = Distribution_no_finalize_distribution_options()
dist.ext_modules = [ext]
dist.include_dirs = includes
buildcmd = dist.get_command_obj("build")
Expand Down