diff --git a/build/pkgs/setuptools_scm/checksums.ini b/build/pkgs/setuptools_scm/checksums.ini index d4c9ee1a391..fd10a17aea2 100644 --- a/build/pkgs/setuptools_scm/checksums.ini +++ b/build/pkgs/setuptools_scm/checksums.ini @@ -1,5 +1,5 @@ -tarball=setuptools_scm-VERSION.tar.gz -sha1=b8c9447fe6dfc44107c9cbd2fd82314aad3cb95e -md5=0df4e7fd923e4983cd65786efaa0e0d0 -cksum=3196930290 -upstream_url=https://pypi.io/packages/source/s/setuptools_scm/setuptools_scm-VERSION.tar.gz +tarball=setuptools_scm-VERSION-py3-none-any.whl +sha1=cfde7254fe351b69cd4bf02e1b57e0b3c59aa9a6 +md5=4c054a609965886703ede26a4ba3206d +cksum=1360813947 +upstream_url=https://pypi.io/packages/py3/s/setuptools_scm/setuptools_scm-VERSION-py3-none-any.whl diff --git a/build/pkgs/setuptools_scm/dependencies b/build/pkgs/setuptools_scm/dependencies index 7dd3b6e8f6e..e8117f8900b 100644 --- a/build/pkgs/setuptools_scm/dependencies +++ b/build/pkgs/setuptools_scm/dependencies @@ -1,4 +1,4 @@ - typing_extensions | setuptools pip wheel tomli packaging $(PYTHON) +packaging setuptools tomli typing_extensions | pip $(PYTHON) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/setuptools_scm/package-version.txt b/build/pkgs/setuptools_scm/package-version.txt index 2be8aeb6b14..50c496d20c6 100644 --- a/build/pkgs/setuptools_scm/package-version.txt +++ b/build/pkgs/setuptools_scm/package-version.txt @@ -1 +1 @@ -7.0.5 +8.0.4 diff --git a/build/pkgs/setuptools_scm/spkg-install.in b/build/pkgs/setuptools_scm/spkg-install.in deleted file mode 100644 index deba1bb42bb..00000000000 --- a/build/pkgs/setuptools_scm/spkg-install.in +++ /dev/null @@ -1 +0,0 @@ -cd src && sdh_pip_install . diff --git a/pkgs/sage-conf/setup.py b/pkgs/sage-conf/setup.py index 8bf1ba938af..afa05966816 100644 --- a/pkgs/sage-conf/setup.py +++ b/pkgs/sage-conf/setup.py @@ -1,2 +1,13 @@ from setuptools import setup +from setuptools.dist import 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. +Distribution._removed = staticmethod(lambda ep: True) + setup() diff --git a/pkgs/sage-conf_pypi/setup.py b/pkgs/sage-conf_pypi/setup.py index 16686a848c9..ac2b5fb3192 100644 --- a/pkgs/sage-conf_pypi/setup.py +++ b/pkgs/sage-conf_pypi/setup.py @@ -6,12 +6,23 @@ import fnmatch from setuptools import setup +from setuptools.dist import Distribution from distutils.command.build_scripts import build_scripts as distutils_build_scripts from setuptools.command.build_py import build_py as setuptools_build_py from setuptools.command.editable_wheel import editable_wheel as setuptools_editable_wheel from setuptools.errors import SetupError +# 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. +Distribution._removed = staticmethod(lambda ep: True) + + class build_py(setuptools_build_py): def run(self): diff --git a/pkgs/sage-docbuild/setup.py b/pkgs/sage-docbuild/setup.py index beda28e8216..cd42da33ffe 100644 --- a/pkgs/sage-docbuild/setup.py +++ b/pkgs/sage-docbuild/setup.py @@ -1,5 +1,15 @@ #!/usr/bin/env python from setuptools import setup +from setuptools.dist import 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. +Distribution._removed = staticmethod(lambda ep: True) setup() diff --git a/pkgs/sage-setup/setup.py b/pkgs/sage-setup/setup.py index beda28e8216..cd42da33ffe 100644 --- a/pkgs/sage-setup/setup.py +++ b/pkgs/sage-setup/setup.py @@ -1,5 +1,15 @@ #!/usr/bin/env python from setuptools import setup +from setuptools.dist import 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. +Distribution._removed = staticmethod(lambda ep: True) setup() diff --git a/pkgs/sage-sws2rst/setup.py b/pkgs/sage-sws2rst/setup.py index 8bf1ba938af..afa05966816 100644 --- a/pkgs/sage-sws2rst/setup.py +++ b/pkgs/sage-sws2rst/setup.py @@ -1,2 +1,13 @@ from setuptools import setup +from setuptools.dist import 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. +Distribution._removed = staticmethod(lambda ep: True) + setup() diff --git a/src/sage/misc/cython.py b/src/sage/misc/cython.py index 0967a268f6a..5631cc092e3 100644 --- a/src/sage/misc/cython.py +++ b/src/sage/misc/cython.py @@ -422,6 +422,14 @@ def cython(filename, verbose=0, compile_message=False, # 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) dist.ext_modules = [ext] dist.include_dirs = includes buildcmd = dist.get_command_obj("build") diff --git a/src/setup.py b/src/setup.py index f0dd4054bb7..0f28b20d6dc 100755 --- a/src/setup.py +++ b/src/setup.py @@ -11,6 +11,7 @@ import sys import time from setuptools import setup, find_namespace_packages +from setuptools.dist import Distribution from distutils import log import multiprocessing.pool @@ -33,6 +34,15 @@ import multiprocessing multiprocessing.set_start_method('fork', force=True) +# 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. +Distribution._removed = staticmethod(lambda ep: True) + # ######################################################## # ## Set source directory # ########################################################