Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't build doc from tarball #282

Open
Alessandro-Barbieri opened this issue May 12, 2021 · 3 comments
Open

can't build doc from tarball #282

Alessandro-Barbieri opened this issue May 12, 2021 · 3 comments

Comments

@Alessandro-Barbieri
Copy link

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!
@ddemidov
Copy link
Owner

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.

@Alessandro-Barbieri
Copy link
Author

@ddemidov
Copy link
Owner

This looks good. I've added sphinx.ext.autodoc to docs/conf.py to save you one patch: 626aab9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants