CI: allow running testcases with pmbootstrap from pip (MR 1467)

This commit is contained in:
Dolphin von Chips 2020-07-30 17:50:59 +05:00 committed by Oliver Smith
parent 2bfb1417f7
commit 178558cb3d
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -5,6 +5,7 @@
import shutil
import sys
import os
import importlib
from distutils.sysconfig import get_python_lib
@ -33,5 +34,7 @@ def path_pmbootstrap():
sys.exit(1)
# Add pmbootstrap dir to import path
sys.path.append(os.path.realpath(path_pmbootstrap()))
# Check if pmb module can be imported
if importlib.util.find_spec("pmb") is None:
# Add pmbootstrap dir to import path
sys.path.append(os.path.realpath(path_pmbootstrap()))