Clean old module

pull/684/head
Louis Vézina 5 years ago
parent 3f772c96ef
commit 49c793cc89

@ -2,6 +2,19 @@
import os
import sys
from shutil import rmtree
def clean_libs():
libs_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'libs')
# Delete the old module almost empty directory compatible only with Python 2.7.x that cause bad magic number error
# if they are present in Python 3.x.
module_list = ['enum', 'concurrent']
for module in module_list:
module_path = os.path.join(libs_dir, module)
if os.path.isdir(module_path):
rmtree(module_path)
def set_libs():
@ -13,4 +26,5 @@ def set_libs():
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../libs2/'))
clean_libs()
set_libs()

Loading…
Cancel
Save