Skip to content
Snippets Groups Projects
Commit 0ed5dfe5 authored by Dominique Benielli's avatar Dominique Benielli
Browse files

Edit setup.py

parent a5d7d6c8
No related branches found
No related tags found
1 merge request!23.7 to 3.10 compatibility
Pipeline #16133 failed
...@@ -188,9 +188,24 @@ def run_uninstall(root_dir): ...@@ -188,9 +188,24 @@ def run_uninstall(root_dir):
######################### #########################
# Custom 'build_ext' command # 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): class m_build_ext(build_ext):
""" Custom build_ext command """
def run(self): 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__)) root_dir = os.path.dirname(os.path.abspath(__file__))
cur_dir = os.getcwd() cur_dir = os.getcwd()
run_cmake(root_dir) run_cmake(root_dir)
...@@ -198,8 +213,6 @@ class m_build_ext(build_ext): ...@@ -198,8 +213,6 @@ class m_build_ext(build_ext):
run_make_install(root_dir) run_make_install(root_dir)
os.chdir(cur_dir) os.chdir(cur_dir)
build_ext.run(self) build_ext.run(self)
########################## ##########################
# File path read command # File path read command
########################## ##########################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment