cannot install from gitlab-downloaded tarball
Hi devs, to install the latest master version on a cluster without outgoing internet access, I just found that I cannot do python setup.py install --user
for this package from a download like https://git.ligo.org/lscsoft/bilby_pipe/-/archive/master/bilby_pipe-master.tar.gz since that doesn't contain the .git
folder:
Running Python version 3.7.3
Confirmed Python version 3.5.0 or above
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Traceback (most recent call last):
File "setup.py", line 74, in <module>
version_file = write_version_file(VERSION)
File "setup.py", line 36, in write_version_file
["git", "log", "-1", "--pretty=%h %ai"]
File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'log', '-1', '--pretty=%h %ai']' returned non-zero exit status 128.
The workaround is of course to checkout the whole repo, make my own tarball of that and transfer to where I need it. However, the simpler gitlab-CI download link approach works fine for the main bilby
package, so I hope it should be easy for you to similarly update the bilby_pipe
setup with a fallback to work when .git
is not present.