Skip to content
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

purge unused setup.py clean_source custom command #4949

Merged
merged 1 commit into from
Sep 8, 2022
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
15 changes: 0 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,6 @@ def run(self):
pass


class CleanSource(BaseCommand):
description = "clean orphaned pyc/pyo files from the source directory"

def run(self):
for root_path, dir_names, file_names in os.walk("lib"):
for file_name in file_names:
if file_name.endswith("pyc") or file_name.endswith("pyo"):
compiled_path = os.path.join(root_path, file_name)
source_path = compiled_path[:-1]
if not os.path.exists(source_path):
print("Cleaning", compiled_path)
os.remove(compiled_path)


def copy_copyright(cmd, directory):
# Copy the COPYRIGHT information into the package root
iris_build_dir = os.path.join(directory, "iris")
Expand Down Expand Up @@ -116,7 +102,6 @@ def run(self):
[build_std_names],
help_doc="generate CF standard name module",
),
"clean_source": CleanSource,
}


Expand Down