Mercurial > public > mercurial-scm > hg
diff setup.py @ 52684: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 | 30510238284e |
children | 9ff926737dbc |
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