1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
Subject: Sphinx: Do not use version and date from git
Author: Alexander Sulfrian <alexander@sulfrian.net>
Forwarded: not-needed
We cannot use the git version history during the package build.
Index: python-sounddevice/doc/conf.py
===================================================================
--- python-sounddevice.orig/doc/conf.py
+++ python-sounddevice/doc/conf.py
@@ -16,7 +16,6 @@ extensions = [
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon', # support for NumPy-style docstrings
- 'sphinx_last_updated_by_git',
]
autoclass_content = 'init'
@@ -43,17 +42,8 @@ master_doc = 'index'
authors = 'Matthias Geier'
project = 'python-sounddevice'
-try:
- release = check_output(['git', 'describe', '--tags', '--always'])
- release = release.decode().strip()
-except Exception:
- release = '<unknown>'
-
-try:
- today = check_output(['git', 'show', '-s', '--format=%ad', '--date=short'])
- today = today.decode().strip()
-except Exception:
- today = '<unknown date>'
+release = os.getenv('SOUNDDEVICE_VERSION_RELEASE', '<unknown>')
+today = os.getenv('SOUNDDEVICE_VERSION_TODAY', '<unknown date>')
default_role = 'py:obj'
|