CI: replace depreciated module (MR 4500)
See PEP 632: https://peps.python.org/pep-0632 Closes https://gitlab.com/postmarketOS/pmaports/-/issues/2207
This commit is contained in:
parent
5dec8f2c87
commit
c5b66e4090
1 changed files with 5 additions and 4 deletions
|
@ -7,7 +7,7 @@ import sys
|
||||||
import os
|
import os
|
||||||
import importlib
|
import importlib
|
||||||
import importlib.util
|
import importlib.util
|
||||||
from distutils.sysconfig import get_python_lib
|
from site import getsitepackages
|
||||||
|
|
||||||
|
|
||||||
def path_pmbootstrap():
|
def path_pmbootstrap():
|
||||||
|
@ -28,9 +28,10 @@ def path_pmbootstrap():
|
||||||
if os.path.exists(dir + "/pmb/__init__.py"):
|
if os.path.exists(dir + "/pmb/__init__.py"):
|
||||||
return dir
|
return dir
|
||||||
|
|
||||||
dir = get_python_lib()
|
directories = getsitepackages()
|
||||||
if os.path.exists(dir + "/pmb/__init__.py"):
|
for directory in directories:
|
||||||
return dir
|
if os.path.exists(directory + "/pmb/__init__.py"):
|
||||||
|
return directory
|
||||||
|
|
||||||
# Symlink not set up properly
|
# Symlink not set up properly
|
||||||
print("ERROR: 'pmbootstrap' is not a symlink to pmbootstrap.py")
|
print("ERROR: 'pmbootstrap' is not a symlink to pmbootstrap.py")
|
||||||
|
|
Loading…
Reference in a new issue