]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
doc: add social cards generation support in sphinxext-opengraph (#129085)
authorFilipe Laíns 🇵🇸 <lains@riseup.net>
Mon, 20 Jan 2025 20:41:27 +0000 (20:41 +0000)
committerGitHub <noreply@github.com>
Mon, 20 Jan 2025 20:41:27 +0000 (20:41 +0000)
Doc/Makefile
Doc/requirements-no-build.txt [new file with mode: 0644]

index b8896da4a918691b95e025a4ecc8d0c1579eafc5..53af6aca659cef338dd86c9e082ef0fa96e82bb6 100644 (file)
@@ -13,7 +13,8 @@ JOBS         = auto
 PAPER        =
 SOURCES      =
 DISTVERSION  = $(shell $(PYTHON) tools/extensions/patchlevel.py)
-REQUIREMENTS = requirements.txt
+IS_PYTHON_BUILD = $(shell $(PYTHON) -c 'import sysconfig; print("true") if sysconfig.is_python_build() else None')
+REQUIREMENTS = $(if $(IS_PYTHON_BUILD),requirements.txt,requirements-no-build.txt)
 SPHINXERRORHANDLING = --fail-on-warning
 
 # Internal variables.
diff --git a/Doc/requirements-no-build.txt b/Doc/requirements-no-build.txt
new file mode 100644 (file)
index 0000000..8b3c4d4
--- /dev/null
@@ -0,0 +1,7 @@
+-r requirements.txt
+
+# Requirements when not running the build Python,
+# such as optional native extensions.
+
+# Needed to support generating social cards in sphinxext-opengraph.
+--only-binary matplotlib