details: https://code.tryton.org/goocalendar/commit/c9090b2733e3
branch: default
user: Cédric Krier <[email protected]>
date: Sun Mar 29 08:50:20 2026 +0200
description:
Update documentation configuration for pyproject
diffstat:
.gitlab-ci.yml | 1 -
doc/conf.py | 21 ++++++++++-----------
doc/requirements-doc.txt | 1 +
3 files changed, 11 insertions(+), 12 deletions(-)
diffs (55 lines):
diff -r 8d683fe227b7 -r c9090b2733e3 .gitlab-ci.yml
--- a/.gitlab-ci.yml Thu Mar 19 09:27:44 2026 +0100
+++ b/.gitlab-ci.yml Sun Mar 29 08:50:20 2026 +0200
@@ -15,7 +15,6 @@
extends: .check
image: sphinxdoc/sphinx
before_script:
- - pip install setuptools
- pip install -r doc/requirements-doc.txt
- pip install sphinx-lint rstcheck[sphinx]
script:
diff -r 8d683fe227b7 -r c9090b2733e3 doc/conf.py
--- a/doc/conf.py Thu Mar 19 09:27:44 2026 +0100
+++ b/doc/conf.py Sun Mar 29 08:50:20 2026 +0200
@@ -5,23 +5,22 @@
def get_info():
+ import json
import subprocess
- import sys
module_dir = os.path.dirname(os.path.dirname(__file__))
info = dict()
- result = subprocess.run(
- [sys.executable, 'setup.py', '--name', '--description'],
- stdout=subprocess.PIPE, check=True, cwd=module_dir)
- info['name'], info['description'] = (
- result.stdout.decode('utf-8').strip().splitlines())
-
- result = subprocess.run(
- [sys.executable, 'setup.py', '--version'],
- stdout=subprocess.PIPE, check=True, cwd=module_dir)
- info['version'] = result.stdout.decode('utf-8').strip()
+ metadata_cmd = 'python -m build -qq --metadata'
+ if os.environ.get('DOC_NO_ISOLATION'):
+ metadata_cmd += ' --no-isolation'
+ metadata = subprocess.check_output(
+ metadata_cmd, shell=True, encoding='utf-8', cwd=module_dir).strip()
+ metadata = json.loads(metadata)
+ info['name'] = metadata['name']
+ info['description'] = metadata['summary']
+ info['version'] = metadata['version']
return info
diff -r 8d683fe227b7 -r c9090b2733e3 doc/requirements-doc.txt
--- a/doc/requirements-doc.txt Thu Mar 19 09:27:44 2026 +0100
+++ b/doc/requirements-doc.txt Sun Mar 29 08:50:20 2026 +0200
@@ -1,2 +1,3 @@
+build
sphinx_book_theme
sphinx_copybutton