diff options
Diffstat (limited to 'python/setup.py.in')
-rwxr-xr-x | python/setup.py.in | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/python/setup.py.in b/python/setup.py.in index bcc4da49..d75fe550 100755 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -5,11 +5,15 @@ import sys, os try: - import setuptools + from setuptools import setup, Extension except ImportError: - pass - -from distutils.core import setup, Extension + try: + # Using distutils, for python < 3.12 + from distutils.core import setup, Extension + except ImportError: + # distutils is not present in python 3.12 and greater + print("setuptools is required for python >= 3.12") + sys.exit(1) # Below ROOT, we expect to find include, include/libxml2, lib and bin. # On *nix, it is not needed (but should not harm), |