common.smk: find _helpers.py also if pypsa-eur is used as module
This commit is contained in:
parent
34535bcbff
commit
c3bcaee1a2
@ -2,9 +2,14 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
import os, sys
|
import os, sys, glob
|
||||||
|
|
||||||
|
helper_source_path = [match for match in glob.glob('**/_helpers.py', recursive=True)]
|
||||||
|
|
||||||
|
for path in helper_source_path:
|
||||||
|
path = os.path.dirname(os.path.abspath(path))
|
||||||
|
sys.path.insert(0, os.path.abspath(path))
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath("scripts"))
|
|
||||||
from _helpers import validate_checksum
|
from _helpers import validate_checksum
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user