Skip to content
Snippets Groups Projects

3.7 to 3.10 compatibility

1 file
+ 16
3
Compare changes
  • Side-by-side
  • Inline
+ 16
3
@@ -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
##########################
Loading