Installation: no .`version` file error when using `pip install -e .` instead of `python setup.py install`
I just forked the repo and wanted to install it. The doc indicates using
python setup.py install
but since Bilby doc indicates using
pip install -e .
which is also recommended by this post that's what I used.
In this case the .version
file is not created and even though _version_helper.get_version_information()
catches the FileNotFoundError
, it still throws the following error when running:
$ python -c "import pesummary"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/marcarene/projects/python/pesummary/pesummary/__init__.py", line 19, in <module>
__short_version__ = get_version_information(short=True)
File "/Users/marcarene/projects/python/pesummary/pesummary/_version_helper.py", line 210, in get_version_information
with open(version_file, "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/marcarene/projects/python/pesummary/pesummary/.version'
In _version_helper.get_version_information()
I would simply swap
except NameError:
pass
with
except NameError:
return
which I checked to fix this issue.