testcases: support system-wide pmbootstrap install (!208)

Fix this error when installing pmbootstrap with pip and running the
pmaports.git testcases:

ERROR: 'pmbootstrap' is not a symlink to pmbootstrap.py
This commit is contained in:
Luca Weiss 2019-02-09 21:13:07 +01:00 committed by Oliver Smith
parent 2dc0718ddd
commit 156aac8199
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
from distutils.sysconfig import get_python_lib
def path_pmbootstrap():
@ -23,6 +24,10 @@ def path_pmbootstrap():
if os.path.exists(dir + "/pmb/__init__.py"):
return dir
dir = get_python_lib()
if os.path.exists(dir + "/pmb/__init__.py"):
return dir
# Symlink not set up properly
print("ERROR: 'pmbootstrap' is not a symlink to pmbootstrap.py")
sys.exit(1)