Skip to content

Commit

Permalink
Merge pull request #592 from achaikou/readthedocs_version
Browse files Browse the repository at this point in the history
Additional readthedocs fixes
  • Loading branch information
achaikou authored Jan 31, 2025
2 parents 62c10d0 + d492f80 commit f541296
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions python/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,7 @@
# built documents.
#
# The short X.Y version.
version = segyio.__version__

# if the docs are built without actually building segyio (what readthedocs
# does), the version string will fall back to '0.0.0'. but since readthedocs
# (and maybe other jobs that builds doc) often fetch from git, they can fall
# back to also trying git-describe themselves.
if version == '0.0.0':
try:
# static analysis flags the subproces module as a potential security
# problem, but this takes no user input and should be safe
from subprocess import check_output # nosec
version = str(check_output(['git', 'describe']).strip()) # nosec
finally:
# couldn't run git-describe - fall back to 0.0.0 and accept that we
# won't get reasonable version numbers automatically
pass
version = "1.19.12"

# The full version, including alpha/beta/rc tags.
release = version
Expand Down Expand Up @@ -415,6 +400,6 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'https://docs.python.org/': None,
'https://docs.scipy.org/doc/numpy/': None,
"python": ("https://docs.python.org/", None),
"numpy": ("https://docs.scipy.org/doc/numpy/", None),
}

0 comments on commit f541296

Please sign in to comment.