From 42a1e56b507d1da1cb95c42956a4653f337bf86f Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Sat, 7 Nov 2020 18:50:46 +0100 Subject: [PATCH] Remove unused `find_package_dirs` function (#267) --- auditwheel/tools.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/auditwheel/tools.py b/auditwheel/tools.py index b47657c8..b12d056b 100644 --- a/auditwheel/tools.py +++ b/auditwheel/tools.py @@ -2,7 +2,6 @@ import os import shutil from glob import glob -from os.path import exists, isdir from os.path import join as pjoin import zipfile import subprocess @@ -82,28 +81,6 @@ def tarbz2todir(tarbz2_fname, out_dir): subprocess.check_output(['tar', 'xjf', tarbz2_fname, '-C', out_dir]) -def find_package_dirs(root_path): - """Find python package directories in directory `root_path` - - Parameters - ---------- - root_path : str - Directory to search for package subdirectories - - Returns - ------- - package_sdirs : set - Set of strings where each is a subdirectory of `root_path`, containing - an ``__init__.py`` file. Paths prefixed by `root_path` - """ - package_sdirs = set() - for entry in os.listdir(root_path): - fname = entry if root_path == '.' else pjoin(root_path, entry) - if isdir(fname) and exists(pjoin(fname, '__init__.py')): - package_sdirs.add(fname) - return package_sdirs - - class EnvironmentDefault(argparse.Action): """Get values from environment variable."""