From 0ed5dfe58bbd8a1f0b122dbd97dcbb57378de334 Mon Sep 17 00:00:00 2001 From: Dominique Benielli <dominique.benielli@univ-amu.fr> Date: Tue, 6 May 2025 16:24:22 +0200 Subject: [PATCH] Edit setup.py --- setup.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 2486a99..ba430bc 100755 --- a/setup.py +++ b/setup.py @@ -188,9 +188,24 @@ def run_uninstall(root_dir): ######################### # Custom 'build_ext' command ######################### +"""class m_build_ext(build_ext): + """ # Custom build_ext command + """ + def run(self): + root_dir = os.path.dirname(os.path.abspath(__file__)) + cur_dir = os.getcwd() + run_cmake(root_dir) + run_make(root_dir) + run_make_install(root_dir) + os.chdir(cur_dir) + build_ext.run(self) +""" class m_build_ext(build_ext): - """ Custom build_ext command """ def run(self): + for dirpath, dirnames, filenames in os.walk('.'): + for filename in filenames: + if filename.endswith('.c'): + os.remove(os.path.join(dirpath, filename)) root_dir = os.path.dirname(os.path.abspath(__file__)) cur_dir = os.getcwd() run_cmake(root_dir) @@ -198,8 +213,6 @@ class m_build_ext(build_ext): run_make_install(root_dir) os.chdir(cur_dir) build_ext.run(self) - - ########################## # File path read command ########################## -- GitLab