|
6 | 6 |
|
7 | 7 | # -- Path setup --------------------------------------------------------------
|
8 | 8 |
|
| 9 | +import importlib.metadata |
| 10 | + |
9 | 11 | # If extensions (or modules to document with autodoc) are in another directory,
|
10 | 12 | # add these directories to sys.path here. If the directory is relative to the
|
11 | 13 | # documentation root, use os.path.abspath to make it absolute, like shown here.
|
12 | 14 | #
|
13 | 15 | import os
|
14 | 16 | import sys
|
15 | 17 | import time
|
16 |
| -from datetime import datetime |
17 |
| - |
18 |
| -from pkg_resources import get_distribution |
| 18 | +from datetime import UTC, datetime |
19 | 19 |
|
20 | 20 | sys.path.insert(0, os.path.abspath(".."))
|
21 | 21 |
|
22 | 22 |
|
23 | 23 | # -- Project information -----------------------------------------------------
|
24 | 24 |
|
25 |
| -build_date = datetime.utcfromtimestamp( |
26 |
| - int(os.environ.get("SOURCE_DATE_EPOCH", time.time())) |
| 25 | +build_date = datetime.fromtimestamp( |
| 26 | + int(os.environ.get("SOURCE_DATE_EPOCH", time.time())), UTC |
27 | 27 | )
|
28 | 28 | project = "cwl-utils: Python utilities Common Workflow Language documents"
|
29 | 29 | copyright = f"2019 — {build_date.year} CWL Community"
|
|
82 | 82 | # so a file named "default.css" will overwrite the builtin "default.css".
|
83 | 83 | html_static_path = ["_static"]
|
84 | 84 |
|
85 |
| -release = get_distribution("cwl-utils").version |
| 85 | +release = importlib.metadata.version("cwl_utils") |
86 | 86 | version = ".".join(release.split(".")[:2])
|
87 | 87 |
|
88 | 88 | autoapi_dirs = ["../cwl_utils"]
|
|
0 commit comments