stefanseefeld / faber

Faber
https://stefanseefeld.github.io/faber
Boost Software License 1.0
14 stars 2 forks source link

Faber version unknown with shallow clone #13

Open mloskot opened 5 years ago

mloskot commented 5 years ago

I'm installing from shallow clone of the latest develop on Ubuntu using Python 3.5.2 and 3.6.7 (part of https://github.com/boostorg/gil/pull/220 task):

$ cd faber
$ python3 -m venv .env
$ source ./.env/bin/activate
$ python setup.py install
...
running install_scripts
copying build/scripts-3.6/faber -> /home/mloskot/tmp/faber/.env/bin
changing mode of /home/mloskot/tmp/faber/.env/bin/faber to 777
running install_data
creating /home/mloskot/tmp/faber/.env/lib/python3.6/site-packages/share
creating /home/mloskot/tmp/faber/.env/lib/python3.6/site-packages/share/doc
creating /home/mloskot/tmp/faber/.env/lib/python3.6/site-packages/share/doc/faber-unknown
copying LICENSE -> /home/mloskot/tmp/faber/.env/lib/python3.6/site-packages/share/doc/faber-unknown
copying README.md -> /home/mloskot/tmp/faber/.env/lib/python3.6/site-packages/share/doc/faber-unknown
running install_egg_info
Writing /home/mloskot/tmp/faber/.env/lib/python3.6/site-packages/faber-unknown.egg-info

Notice the -unknown suffix in the deployed files above.

$ which faber
/home/mloskot/tmp/faber/.env/bin/faber
$ faber --version
Faber version unknown

Since the shallow clone does not include any tags, the version is unknown.

Since shallow clone is preferred on CI builds, perhaps it would be possible to improve this to report known version (even if it is just version number, without revision).