Skip to content

Commit

Permalink
Merge pull request #29 from dgrigonis/ext_file_format
Browse files Browse the repository at this point in the history
File extension for extension modules
  • Loading branch information
mgedmin authored May 28, 2024
2 parents e7ee2eb + c7fe507 commit a98b9f6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions findimports.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
import pickle
import re
import sys
import sysconfig
import tokenize
import zipfile
from operator import attrgetter
Expand Down Expand Up @@ -559,13 +560,8 @@ def __init__(self):
self._module_cache = {}
self._warned_about = set()
self._stderr = sys.stderr
self._exts = ('.py', '.so', '.dll')
if hasattr(sys, '_multiarch'): # pragma: nocover
# Ubuntu 14.04 LTS renames
# /usr/lib/python2.7/lib-dynload/datetime.so to
# /usr/lib/python2.7/lib-dynload/datetime.x86_64-linux-gnu.so
# (https://github.com/mgedmin/findimports/issues/3)
self._exts += f".{sys._multiarch}.so"
self._exts = ['.py', '.so', '.dll']
self._exts.append(sysconfig.get_config_var('EXT_SUFFIX'))

def warn(self, about, message, *args):
if about in self._warned_about:
Expand Down

0 comments on commit a98b9f6

Please sign in to comment.