From 0fa92ccf5eb9ee1abf6a4491dd74c908e04a311e Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Tue, 31 Jan 2023 21:56:51 -0300 Subject: [PATCH] build: remove pip packaging artifacts with ns3 distclean Signed-off-by: Gabriel Ferreira --- ns3 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ns3 b/ns3 index 2537288d8..deb047ff2 100755 --- a/ns3 +++ b/ns3 @@ -497,6 +497,15 @@ def clean_docs_and_tests_artifacts(dry_run=False): remove_file(file, dry_run) +def clean_pip_packaging_artifacts(dry_run=False): + pip_dirs = [os.path.join(ns3_path, "dist"), + os.path.join(ns3_path, "nsnam.egg-info"), + os.path.join(ns3_path, "wheelhouse") + ] + for directory in pip_dirs: + remove_dir(directory, dry_run) + + def search_cmake_cache(build_profile): # Search for the CMake cache cmake_cache_files = glob.glob("%s/**/CMakeCache.txt" % ns3_path, recursive=True) @@ -1426,6 +1435,7 @@ def main(): if args.distclean: clean_cmake_artifacts(dry_run=args.dry_run) clean_docs_and_tests_artifacts(dry_run=args.dry_run) + clean_pip_packaging_artifacts(dry_run=args.dry_run) # We end things earlier when cleaning return