diff options
author | Anthony Sottile <asottile@umich.edu> | 2019-07-08 09:32:21 -0700 |
---|---|---|
committer | Paul Ganssle <paul@ganssle.io> | 2019-08-17 14:29:21 -0700 |
commit | eb7436b36f9967d1becd2b822da548bd59b35d05 (patch) | |
tree | 7eb76398792eafeb4e0a675ec1a7094efa3c1e3f /setuptools/command/install_lib.py | |
parent | 05f42a2c14275937250c99478c94b20171d14aeb (diff) | |
download | python-setuptools-git-eb7436b36f9967d1becd2b822da548bd59b35d05.tar.gz |
Fix some usage of deprecated `imp` module
Diffstat (limited to 'setuptools/command/install_lib.py')
-rw-r--r-- | setuptools/command/install_lib.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 2b31c3e3..07d65933 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -1,5 +1,5 @@ import os -import imp +import sys from itertools import product, starmap import distutils.command.install_lib as orig @@ -74,10 +74,10 @@ class install_lib(orig.install_lib): yield '__init__.pyc' yield '__init__.pyo' - if not hasattr(imp, 'get_tag'): + if not hasattr(sys, 'implementation'): return - base = os.path.join('__pycache__', '__init__.' + imp.get_tag()) + base = os.path.join('__pycache__', '__init__.' + sys.implementation.cache_tag) yield base + '.pyc' yield base + '.pyo' yield base + '.opt-1.pyc' |