Skip to content

Minor installation issue if only cloning last commit

If I clone pystencils with --depth 1 the function version_number_from_git() in pystencils/doc/ will crash during python setup.py since git tag will return nothing:

$ git clone --depth 1 --branch hyteg  git@i10git.cs.fau.de:pycodegen/pystencils.git
$ git tag
$ python3 setup.py develop
Traceback (most recent call last):
  File "setup.py", line 52, in <module>
    version=version_number_from_git(),
  File "/builds/terraneo/pystencils/doc/version_from_git.py", line 18, in version_number_from_git
    latest_release = get_released_versions()[-1]
IndexError: list index out of range