diff --git a/.gitignore b/.gitignore index d8dd9b8..cc6242e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /python-docx-0.8.5.tar.gz /python-docx-0.8.11.tar.gz /python-docx-1.0.1.tar.gz +/python-docx-1.1.0.tar.gz diff --git a/1258.patch b/1258.patch deleted file mode 100644 index 24a9d71..0000000 --- a/1258.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 9a0ea2cf4b9167c350c8db05f91f49db19c16f58 Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Fri, 13 Oct 2023 09:18:17 -0400 -Subject: [PATCH] Add build backend in pyproject.toml - ---- - pyproject.toml | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/pyproject.toml b/pyproject.toml -index dc9884a9b..74149e24d 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -1,5 +1,6 @@ - [build-system] - requires = ["setuptools>=61.0.0"] -+build-backend = "setuptools.build_meta" - - [project] - name = "python-docx" diff --git a/python-docx.spec b/python-docx.spec index 5e05da5..b48ca9a 100644 --- a/python-docx.spec +++ b/python-docx.spec @@ -5,7 +5,7 @@ %bcond doc 1 Name: python-docx -Version: 1.0.1 +Version: 1.1.0 Release: %autorelease Summary: Create and modify Word documents with Python @@ -14,15 +14,7 @@ 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} -# Include requirements files in PyPI sdist -# https://github.com/python-openxml/python-docx/pull/1259 -Source1: https://github.com/python-openxml/python-docx/raw/v%{version}/requirements.txt -Source2: https://github.com/python-openxml/python-docx/raw/v%{version}/requirements-test.txt - -# Add build backend in pyproject.toml -# https://github.com/python-openxml/python-docx/pull/1258 -Patch: https://github.com/python-openxml/python-docx/pull/1258.patch +Source: %{pypi_source python-docx} BuildArch: noarch @@ -59,9 +51,7 @@ Summary: Documentation for python-docx %prep -%autosetup -p1 - -cp -p '%{SOURCE1}' '%{SOURCE2}' . +%autosetup # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters sed -r -i 's/^(ruff)\b/# &/' requirements-test.txt @@ -81,6 +71,10 @@ echo 'intersphinx_mapping.clear()' >> docs/conf.py # Fix a stray CRLF-terminated reStructuredText file: dos2unix --keepdate docs/dev/analysis/features/table/cell-merge.rst +# While filterwarnings = ["error"] makes sense for upstream development and CI, +# it is too strict for distribution packaging. +sed -r -i 's/^([[:blank:]]*)("error",)$/\1# \2/' pyproject.toml + %generate_buildrequires %pyproject_buildrequires -t diff --git a/requirements-test.txt b/requirements-test.txt deleted file mode 100644 index 85d9f6b..0000000 --- a/requirements-test.txt +++ /dev/null @@ -1,5 +0,0 @@ --r requirements.txt -behave>=1.2.3 -pyparsing>=2.0.1 -pytest>=2.5 -ruff diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index a156cfe..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -lxml>=3.1.0 -typing-extensions diff --git a/sources b/sources index 065fd86..10605fb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-docx-1.0.1.tar.gz) = 5e50653086e9bc8b4487d92a2a11db161018f9c96721a926b4820b404167b051d021a96de5c4467aa63d0b19b25033f9522376e1ce8b185043ab7a0e8f5e131a +SHA512 (python-docx-1.1.0.tar.gz) = ad654d68b3f0825bf9483c20092eb559016c3481e75e098d62e3b3b703697409abc244a38854fd0cee8919d852b068d0f88af12478b589885cbd0e80972653d3