File: Remove-dependency-on-sphinx-asdf.patch

package info (click to toggle)
python-asdf 2.14.3-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,280 kB
  • sloc: python: 16,612; makefile: 124
file content (38 lines) | stat: -rw-r--r-- 1,425 bytes parent folder | download
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
From: Ole Streicher <olebole@debian.org>
Date: Sat, 29 Oct 2022 09:55:20 +0200
Subject: Remove dependency on sphinx-asdf

---
 docs/conf.py | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index 3698a4d..c1c274d 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -2,13 +2,9 @@ from pathlib import Path
 
 import tomli
 
-# The standard library importlib.metadata returns duplicate entrypoints
-# for all python versions up to and including 3.11
-# https://github.com/python/importlib_metadata/issues/410#issuecomment-1304258228
-# see PR https://github.com/asdf-format/asdf/pull/1260
-# see issue https://github.com/asdf-format/asdf/issues/1254
-from importlib_metadata import distribution
-from sphinx_asdf.conf import *  # noqa: F403
+from sphinx_astropy.conf import *  # noqa: F403
+import os
+import datetime
 
 # Get configuration information from `pyproject.toml`
 with open(Path(__file__).parent.parent / "pyproject.toml", "rb") as configuration_file:
@@ -20,7 +16,7 @@ project = configuration["name"]
 author = f"{configuration['authors'][0]['name']} <{configuration['authors'][0]['email']}>"
 copyright = f"{datetime.datetime.now().year}, {configuration['authors'][0]['name']}"
 
-release = distribution(configuration["name"]).version
+release = os.environ['DEB_VERSION_UPSTREAM']
 # for example take major/minor
 version = ".".join(release.split(".")[:2])