%global _trivial .0 %global _buildid .1 Name: python3-sphinx-self-contained Version: 8.2.3 Release: 1%{dist}%{?_trivial}%{?_buildid} Summary: A self-contained, isolated Python Sphinx environment for build tasks. License: BSD-2-Clause AND other licenses (from vendored packages) URL: https://www.sphinx-doc.org/ Source0: python3-sphinx-vendored-pkgs.tar.gz Source1: python3-sphinx-vendored-bin.tar.gz %global python3_version 3.12 # Build Dependencies BuildRequires: python%{python3_version} BuildRequires: python%{python3_version}-pip Requires: python%{python3_version} Requires: python%{python3_version}-pip Provides: python%{python3_version}-sphinx = %{version}-%{release} Provides: python3-sphinx = %{version}-%{release} Provides: bundled(python-alabaster) = 1.0.0 Provides: bundled(python-babel) = 2.17.0 Provides: bundled(python-certifi) = 2025.11.12 Provides: bundled(python-charset-normalizer) = 3.4.4 Provides: bundled(python-docutils) = 0.21.2 Provides: bundled(python-idna) = 3.11 Provides: bundled(python-imagesize) = 1.4.1 Provides: bundled(python-Jinja2) = 3.1.6 Provides: bundled(python-MarkupSafe) = 3.0.3 Provides: bundled(python-packaging) = 25.0 Provides: bundled(python-Pygments) = 2.19.2 Provides: bundled(python-requests) = 2.32.5 Provides: bundled(python-roman-numerals-py) = 3.1.0 Provides: bundled(python-snowballstemmer) = 3.0.1 Provides: bundled(python-sphinxcontrib-applehelp) = 2.0.0 Provides: bundled(python-sphinxcontrib-devhelp) = 2.0.0 Provides: bundled(python-sphinxcontrib-htmlhelp) = 2.1.0 Provides: bundled(python-sphinxcontrib-jsmath) = 1.0.1 Provides: bundled(python-sphinxcontrib-qthelp) = 2.0.0 Provides: bundled(python-sphinxcontrib-serializinghtml) = 2.0.0 Provides: bundled(python-urllib3) = 2.5.0 # REMOVED: BuildArch: noarch # The package will now be tied to the architecture due to arch-specific files in the VENV. %description This package provides a self-contained, isolated environment containing the python3-sphinx utility and all its dependencies. %global __python3 /usr/bin/python%{python3_version} %global _venv_name .venv_sphinx_build %global _venv_build_path %{_builddir}/%{name}-%{version}/%{_venv_name} %global _venv_install_path %{_datadir}/%{name}/%{_venv_name} %global _venv_lib_dir %{_venv_build_path}/lib/python%{python3_version}/site-packages %define __requires_exclude_from ^%{_venv_install_path}/.*$ %define __provides_exclude_from ^%{_venv_install_path}/.*$ %prep %{nil} %build echo "Creating isolated virtual environment at %{_venv_build_path}..." %{__python3} -m venv %{_venv_build_path} pushd %{_venv_build_path} tar -xf %{SOURCE1} -C. cat > pyvenv.cfg << EOF include-system-site-packages = false EOF popd echo "Extracting vendored packages directly into %{_venv_lib_dir}..." mkdir -p %{_venv_lib_dir} pushd %{_venv_lib_dir} tar -xf %{SOURCE0} -C . popd %install install -d -m 755 %{buildroot}%{_datadir}/%{name} cp -a %{_venv_build_path} %{buildroot}%{_datadir}/%{name}/ VENV_BIN_DIR="%{buildroot}%{_venv_install_path}/bin" pushd $VENV_BIN_DIR pwd ls -l rst* sphinx* mkdir -p %{buildroot}/%{_bindir} ls rst* sphinx* | while read script do head -1 $script | grep python >/dev/null || continue ln -sf %{_venv_install_path}/bin/"$script" %{buildroot}/%{_bindir}/"$script" done popd %files %{_datadir}/%{name}/%{_venv_name} %{_bindir}/* %changelog * Sat Nov 15 2025 Yonghang Wang - 8.2.3-1.amzn2023.0.1 - Build with 8.2.3