diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2021-11-13 09:26:28 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2021-11-13 09:26:38 -0500 |
commit | 888ab6de173f703b13b36ab278170e2004e0752d (patch) | |
tree | bfad8dbdbdb3297f696047f091d541453337530c | |
parent | 26db6fea75f45f79d79897a3f99c6d1b1d1eddb4 (diff) | |
download | python-setuptools-git-888ab6de173f703b13b36ab278170e2004e0752d.tar.gz |
Add a hook on import of distutils that will allow Debian to override the default behavior. Fixes #2.
-rw-r--r-- | distutils/__init__.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/distutils/__init__.py b/distutils/__init__.py index d823d040..0ba5e44a 100644 --- a/distutils/__init__.py +++ b/distutils/__init__.py @@ -9,5 +9,15 @@ used from a setup script as """ import sys +import importlib __version__ = sys.version[:sys.version.index(' ')] + + +try: + # Allow Debian (only) to customize system behavior. + # Ref pypa/distutils#2. This hook is deprecated and + # no other environments should use it. + importlib.import_module('_distutils_system_mod') +except ImportError: + pass |