Blame SOURCES/sphinx-no-git.patch

rdobuilder a76def
diff --git a/docs/conf.py b/docs/conf.py
rdobuilder a76def
index d2e19c6..fb540a3 100644
rdobuilder a76def
--- a/docs/conf.py
rdobuilder a76def
+++ b/docs/conf.py
rdobuilder a76def
@@ -44,29 +44,6 @@ import subprocess
rdobuilder a76def
 _project_root = pathlib.Path(__file__).parent.parent
rdobuilder a76def
 _source_root = _project_root / "src"
rdobuilder a76def
 
rdobuilder a76def
-_git_reference = subprocess.run(
rdobuilder a76def
-    ["git", "rev-parse", "--abbrev-ref", "HEAD"],
rdobuilder a76def
-    text=True,
rdobuilder a76def
-    encoding="utf8",
rdobuilder a76def
-    capture_output=True,
rdobuilder a76def
-    check=True,
rdobuilder a76def
-).stdout
rdobuilder a76def
-
rdobuilder a76def
-
rdobuilder a76def
-# Try to find URL fragment for the GitHub source page based on current
rdobuilder a76def
-# branch or tag.
rdobuilder a76def
-
rdobuilder a76def
-if _git_reference == "HEAD":
rdobuilder a76def
-    # It looks like the branch has no name.
rdobuilder a76def
-    # Fallback to commit ID.
rdobuilder a76def
-    _git_reference = subprocess.getoutput("git rev-parse HEAD")
rdobuilder a76def
-
rdobuilder a76def
-if os.environ.get("READTHEDOCS", "") == "True":
rdobuilder a76def
-    rtd_version = os.environ.get("READTHEDOCS_VERSION", "")
rdobuilder a76def
-    if "." in rtd_version:
rdobuilder a76def
-        # It looks like we have a tag build.
rdobuilder a76def
-        _git_reference = rtd_version
rdobuilder a76def
-
rdobuilder a76def
 pydoctor_args = [
rdobuilder a76def
     # pydoctor should not fail the sphinx build, we have another tox environment for that.
rdobuilder a76def
     "--intersphinx=https://docs.twisted.org/en/twisted-22.1.0/api/objects.inv",
rdobuilder a76def
@@ -75,7 +52,6 @@ pydoctor_args = [
rdobuilder a76def
     "--intersphinx=https://zopeinterface.readthedocs.io/en/latest/objects.inv",
rdobuilder a76def
     # TODO: not sure why I have to specify these all twice.
rdobuilder a76def
     f"--config={_project_root}/.pydoctor.cfg",
rdobuilder a76def
-    f"--html-viewsource-base=https://github.com/glyph/automat/tree/{_git_reference}/src",
rdobuilder a76def
     f"--project-base-dir={_source_root}",
rdobuilder a76def
     "--html-output={outdir}/api",
rdobuilder a76def
     "--privacy=HIDDEN:automat.test.*",