## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 7; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec # Sphinx-generated HTML documentation is not suitable for packaging; see # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. # # We can generate PDF documentation as a lesser substitute. %bcond_without doc_pdf Name: python-docx Version: 0.8.11 Release: %autorelease Summary: Create and modify Word documents with Python License: MIT URL: https://python-docx.readthedocs.io/en/latest/ # We MUST use the PyPI tarball; the GitHub tarball includes material under ref/ # (PDFs of ISO/IEC standards) for which redistribution may be prohibited. Source0: %{pypi_source python-docx} BuildArch: noarch BuildRequires: python3-devel BuildRequires: dos2unix # Extra dependencies for documentation %if %{with doc_pdf} BuildRequires: make BuildRequires: python3dist(sphinx) BuildRequires: python3-docs BuildRequires: python3-sphinx-latex BuildRequires: latexmk %endif %global common_description %{expand: A Python library for creating and updating Microsoft Word (.docx) files.} %description %{common_description} %package -n python3-docx Summary: %{summary} %py_provides python-docx %description -n python3-docx %{common_description} %package doc Summary: Documentation for python-docx Requires: python3-docs %description doc %{common_description} %prep %autosetup # We don’t want to package https://github.com/armstrong/armstrong_sphinx (and # shouldn’t use the bundled copy), so we just switch the documentation theme # from “armstrong” to the built-in “alabaster”. The result seems similarly # useful, without the bundling. rm -rf docs/_themes sed -r -i 's@armstrong@alabaster@' docs/conf.py # Use local inventories in intersphinx mappings. sed -r -i 's@https?://docs.python.org/3?@/%{_docdir}/python3-docs/html@' \ docs/conf.py # Fix a stray CRLF-terminated reStructuredText file: dos2unix docs/dev/analysis/features/table/cell-merge.rst %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel %if %{with doc_pdf} %make_build -C docs latex SPHINXOPTS='%{?_smp_mflags}' %make_build -C docs/.build/latex %endif %install %pyproject_install %pyproject_save_files docx %check %tox # Fail the build if the tarball accidentally included ISO/IEC standards # documents that should not have been redistributed. Note that removing these # in %%prep would not have been good enough. banned="$(find . -type f -name 'ISO*.pdf')" if [ -n "${banned}" ] then cat < 0.8.11-7 - Generate PDF instead of HTML Sphinx documentation. * Mon Sep 13 2021 Benjamin A. Beasley 0.8.11-6 - Let pyproject-rpm-macros handle the license file * Sun Sep 12 2021 Benjamin A. Beasley 0.8.11-5 - Reduce spec file macro indirection * Sun Sep 12 2021 Benjamin A. Beasley 0.8.11-4 - Drop BR on pyproject-rpm-macros, now implied by python3-devel * Tue Aug 10 2021 Benjamin A. Beasley 0.8.11-3 - Use the PyPI tarball to avoid redistributing ISO standard PDFs * Fri Aug 06 2021 Benjamin A. Beasley 0.8.11-2 - Clean up some leftover historical debris in the spec file * Fri Aug 06 2021 Benjamin A. Beasley 0.8.11-1 - Update to 0.8.11. (Fix CVE-2016-5851, fix RHBZ#1351082, fix RHBZ#1351083, fix RHBZ#1349211, fix RHBZ#1926209.) * Tue Jul 27 2021 Fedora Release Engineering - 0.8.5-26 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.8.5-25 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 0.8.5-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 0.8.5-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 0.8.5-22 - Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 0.8.5-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok - 0.8.5-20 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 0.8.5-19 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 0.8.5-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Feb 02 2019 Fedora Release Engineering - 0.8.5-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Tue Aug 21 2018 Miro Hrončok - 0.8.5-16 - Drop python2 subpackage * Sat Jul 14 2018 Fedora Release Engineering - 0.8.5-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 0.8.5-14 - Rebuilt for Python 3.7 * Tue Jun 19 2018 Miro Hrončok - 0.8.5-13 - Rebuilt for Python 3.7 * Fri Feb 09 2018 Fedora Release Engineering - 0.8.5-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Tue Jan 30 2018 Iryna Shcherbina - 0.8.5-11 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - Move python3-lxml form py2 to py3 subpkg - Add python_provide to py3 subpackage * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.8.5-10 - Python 2 binary package renamed to python2-docx See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 * Thu Jul 27 2017 Fedora Release Engineering - 0.8.5-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.8.5-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 0.8.5-7 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 0.8.5-6 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 0.8.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Nov 10 2015 Fedora Release Engineering - 0.8.5-4 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Jun 18 2015 Fedora Release Engineering - 0.8.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Fri Mar 13 2015 Kushal Khandelwal - 0.8.5-2 - Fix dependency requirement. * Mon Mar 9 2015 Kushal Khandelwal - 0.8.5-1 - update to 0.8.5 * Fri Feb 20 2015 Kushal Khandelwal - 0.8.2-1 - Initial package.