mirror of
https://git.mirrors.martin98.com/https://github.com/petaflot/pygcode
synced 2025-08-13 16:19:01 +08:00
fixed path relativity (after moving to 'src')
This commit is contained in:
parent
fafcd6eaba
commit
7c96a2974d
@ -29,7 +29,7 @@ for pygcode_lib_type in ('installed_lib', 'relative_lib'):
|
|||||||
import sys, os, inspect
|
import sys, os, inspect
|
||||||
# Add pygcode (relative to this test-path) to the system path
|
# Add pygcode (relative to this test-path) to the system path
|
||||||
_this_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
_this_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||||
sys.path.insert(0, os.path.join(_this_path, '..'))
|
sys.path.insert(0, os.path.join(_this_path, '..', 'src'))
|
||||||
if pygcode_lib_type == 'installed_lib':
|
if pygcode_lib_type == 'installed_lib':
|
||||||
continue # import was attempted before sys.path addition. retry import
|
continue # import was attempted before sys.path addition. retry import
|
||||||
raise # otherwise the raised ImportError is a genuine problem
|
raise # otherwise the raised ImportError is a genuine problem
|
||||||
|
Loading…
x
Reference in New Issue
Block a user