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

Setuptools-scm causes documentation build to fail #52

Open
ambrosejcarr opened this issue Oct 12, 2018 · 0 comments
Open

Setuptools-scm causes documentation build to fail #52

ambrosejcarr opened this issue Oct 12, 2018 · 0 comments
Assignees

Comments

@ambrosejcarr
Copy link
Member

When attempting to build docs, setuptools-scm fails to load.

WARNING: autodoc: failed to import module 'setup'; the following exception was raised:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/sphinx/ext/autodoc/importer.py", line 140, in import_module
    __import__(modname)
  File "/Users/ajc/projects/broadinstitute/cromwell-tools/setup.py", line 37, in <module>
    include_package_data=True
  File "/usr/local/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/local/lib/python3.6/site-packages/setuptools/dist.py", line 370, in __init__
    k: v for k, v in attrs.items()
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 281, in __init__
    self.finalize_options()
  File "/usr/local/lib/python3.6/site-packages/setuptools/dist.py", line 529, in finalize_options
    ep.load()(self, ep.name, value)
  File "/usr/local/lib/python3.6/site-packages/setuptools_scm/integration.py", line 22, in version_keyword
    dist.metadata.version = get_version(**value)
  File "/usr/local/lib/python3.6/site-packages/setuptools_scm/__init__.py", line 119, in get_version
    parsed_version = _do_parse(root, parse)
  File "/usr/local/lib/python3.6/site-packages/setuptools_scm/__init__.py", line 97, in _do_parse
    "use git+https://github.com/user/proj.git#egg=proj" % root)
LookupError: setuptools-scm was unable to detect version for '/Users/ajc/projects/humancellatlas/sctools/docs'.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj

Reproduce the error:

# checkout the branch where I'm fixing readthedocs; note the failure ALSO occurs on 
# master
g checkout ajc-docs-badge-add
cd docs
sphinx-build source/ build/
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