Skip to content

Remove unused find_package_dirs function #267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions auditwheel/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."""

Expand Down