add lookup of relative paths for import hooks, related to #33
This commit is contained in:
parent
7df35ed05d
commit
ff450a03de
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "delta-barth"
|
name = "delta-barth"
|
||||||
version = "0.5.10"
|
version = "0.5.11rc2"
|
||||||
description = "workflows and pipelines for the Python-based Plugin of Delta Barth's ERP system"
|
description = "workflows and pipelines for the Python-based Plugin of Delta Barth's ERP system"
|
||||||
authors = [
|
authors = [
|
||||||
{name = "Florian Förster", email = "f.foerster@d-opt.com"},
|
{name = "Florian Förster", email = "f.foerster@d-opt.com"},
|
||||||
@ -74,7 +74,7 @@ directory = "reports/coverage"
|
|||||||
|
|
||||||
|
|
||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "0.5.10"
|
current_version = "0.5.11rc2"
|
||||||
parse = """(?x)
|
parse = """(?x)
|
||||||
(?P<major>0|[1-9]\\d*)\\.
|
(?P<major>0|[1-9]\\d*)\\.
|
||||||
(?P<minor>0|[1-9]\\d*)\\.
|
(?P<minor>0|[1-9]\\d*)\\.
|
||||||
|
|||||||
22
src/delta_barth/_debug.py
Normal file
22
src/delta_barth/_debug.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import importlib.util
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
def print_infos() -> str:
|
||||||
|
PATH = os.environ.get("PATH", "")
|
||||||
|
PY_HOME = os.environ.get("PYTHONHOME", "")
|
||||||
|
PY_PATH = os.environ.get("PYTHONPATH", "")
|
||||||
|
SYS_PATH = sys.path
|
||||||
|
|
||||||
|
out = ""
|
||||||
|
out += f"\n>>> PATH is:\n{PATH}"
|
||||||
|
out += f"\n>>> PYTHONHOME is:\n{PY_HOME}"
|
||||||
|
out += f"\n>>> PYTHONPATH is:\n{PY_PATH}"
|
||||||
|
out += f"\n>>> Internal sys.path is:\n{SYS_PATH}"
|
||||||
|
found_spec = importlib.util.find_spec("numpy")
|
||||||
|
out += f"\n>>> Found spec for 'numpy' is:\n{found_spec}"
|
||||||
|
|
||||||
|
print(out)
|
||||||
|
|
||||||
|
return out
|
||||||
5
tests/test_debug.py
Normal file
5
tests/test_debug.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
from delta_barth import _debug as debug
|
||||||
|
|
||||||
|
|
||||||
|
def test_print_info():
|
||||||
|
debug.print_infos()
|
||||||
Loading…
x
Reference in New Issue
Block a user