Merge "Correct the relative path calculation"
This commit is contained in:
commit
5a5aa4b037
@ -18,8 +18,12 @@ import sys
|
|||||||
|
|
||||||
LOCATIONS = [
|
LOCATIONS = [
|
||||||
os.path.abspath('.'),
|
os.path.abspath('.'),
|
||||||
# This accounts for pip installations on Ubuntu that go into /usr/local
|
# This accounts for pip installations on Ubuntu that go into /usr/local.
|
||||||
os.path.abspath(os.path.basename(sys.argv[0])),
|
# This logic converts e.g. /usr/local/bin/ironic-python-agent-builder
|
||||||
|
# into /usr/local/share/ironic-python-agent-builder.
|
||||||
|
os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]),
|
||||||
|
'..', 'share',
|
||||||
|
'ironic-python-agent-builder')),
|
||||||
# This accounts for system-wide installations to /usr
|
# This accounts for system-wide installations to /usr
|
||||||
os.path.join(sys.prefix, 'share', 'ironic-python-agent-builder'),
|
os.path.join(sys.prefix, 'share', 'ironic-python-agent-builder'),
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user