vexcl
vexcl copied to clipboard
can't build doc from tarball
It looks like docs can be built only from git checkout
Running Sphinx v4.0.1
Configuration error:
There is a programmable error in your configuration file:
Traceback (most recent call last):
File "/usr/lib/pypy3.7/site-packages/sphinx/config.py", line 323, in eval_config_file
exec(code, namespace)
File "/var/tmp/portage/dev-cpp/vexcl-1.4.2/work/vexcl-1.4.2/docs/conf.py", line 78, in <module>
version = git_version()
File "./git_version.py", line 40, in git_version
raise ValueError("Cannot find the version number!")
ValueError: Cannot find the version number!
Yes, the docs are supposed to be built from full git tree. The docs are built on readthedocs (https://vexcl.readthedocs.io/en/latest/), so may be it is enough to point there?
It should be possible to provide a fallback here: https://github.com/ddemidov/vexcl/blob/master/docs/git_version.py#L37
for example, using environment variables (PV
in ebuild?). A less intrusive (and less Gentoo-specific) option would be to read the version from a file, like it is done here:
https://github.com/ddemidov/amgcl/blob/master/git_version.py#L57
The file could be written by the ebuild script I guess.
That's what I've did here https://github.com/gentoo/guru/commit/d288205bf81177e99b2e867052db04c774f800dd#diff-32a587d54febe5bc38ec43d872734378f7bdedf619d53d2c49d8f9206d499d0eR37
This looks good. I've added sphinx.ext.autodoc to docs/conf.py to save you one patch: 626aab93d5931cac2dd8887e625ea1bddf7611d9.