Closed char101 closed 3 years ago
In general, there's no guarantee that __file__
is absolute, but I agree it's convenient to make it so where it's easy to do so, and it is easy there. Do you want to make a PR?
The change is trivial so I prefer not to make PR. Thanks.
Hi,
I think it is better if
__file__
in https://github.com/takluyver/pynsist/blob/9bc2195111f2bd81f7ae223d005279bcfd9730fb/nsist/__init__.py#L237 is wrapped inos.path.abspath()
first because in some case,__file__
could contain relative path (e.g. https://github.com/spyder-ide/spyder/issues/14706).I tried comparing python 3.7 and 3.9, with 3.9
__file__
is always absolute but with 3.7,__file__
is relative if it is run relatively usingpython script.py
.Thanks.