Mercurial > public > mercurial-scm > hg-stable
changeset 52702:9ec635cc0a29
setup: check that setuptools_scm is importable
author | Pierre Augier <pierre.augier@univ-grenoble-alpes.fr> |
---|---|
date | Mon, 13 Jan 2025 15:52:31 +0100 |
parents | 3c6460c0586f |
children | 1ce66ca747fc |
files | setup.py |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Tue Jan 14 07:31:38 2025 +0100 +++ b/setup.py Mon Jan 13 15:52:31 2025 +0100 @@ -79,6 +79,17 @@ from distutils.sysconfig import get_python_inc from distutils.ccompiler import new_compiler +# raise an explicit error if setuptools_scm is not importable +try: + import setuptools_scm +except ImportError: + raise SystemExit( + "Couldn't import setuptools_scm (direct call of setup.py?)." + ) +else: + del setuptools_scm + + ispypy = "PyPy" in sys.version