diff --git a/pdfminer.six-20250324.tar.gz b/pdfminer.six-20250324.tar.gz deleted file mode 100644 index 667a902617fb577d6cf2ce07ce8c4a9df234f50e..0000000000000000000000000000000000000000 Binary files a/pdfminer.six-20250324.tar.gz and /dev/null differ diff --git a/pdfminer.six-20251107.tar.gz b/pdfminer.six-20251107.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/python-pdfminer.six.spec b/python-pdfminer.six.spec index 121ea0bae7fe9a6af2715626a13d9848de896c7f..b145fcee56f62d6d03c512163f6e5d82bd164e54 100644 --- a/python-pdfminer.six.spec +++ b/python-pdfminer.six.spec @@ -1,12 +1,22 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-pdfminer.six -Version: 20250324 +Version: 20251107 Release: 1 Summary: PDF parser and analyzer. License: MIT URL: https://github.com/pdfminer/pdfminer.six -Source0: https://files.pythonhosted.org/packages/ed/b7/6a631f02f3fa80b2b618156ca315792c27d2d45f62bc573e6da0e224dc63/pdfminer.six-20250324.tar.gz +Source0: https://files.pythonhosted.org/packages/source/p/pdfminer.six/pdfminer.six-%{version}.tar.gz BuildArch: noarch +BuildRequires: python3-build +BuildRequires: python3-hatchling +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-setuptools-git-versioning +BuildRequires: python3-pbr +BuildRequires: python3-pip +BuildRequires: python3-wheel + %description PDF parser and analyzer. @@ -14,12 +24,6 @@ PDF parser and analyzer. Summary: PDF parser and analyzer. Provides: python-pdfminer.six # Base build requires -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-setuptools-git-versioning -BuildRequires: python3-pbr -BuildRequires: python3-pip -BuildRequires: python3-wheel %description -n python3-pdfminer.six PDF parser and analyzer. @@ -32,11 +36,29 @@ Development documents and examples for pdfminer.six. %prep %autosetup -n pdfminer.six-%{version} +# Fix setuptools_scm version issue +if [ -f pyproject.toml ]; then + sed -i '/^version *=/d' pyproject.toml + sed -i '/^\[project\]/a version = "%{version}"' pyproject.toml + sed -i '/dynamic *= *\[.*version.*\]/d' pyproject.toml + if grep -q '^\[tool\.setuptools_scm\]' pyproject.toml; then + sed -i '/^\[tool\.setuptools_scm\]/,/^\[/ {/^write_to *=/d}' pyproject.toml + sed -i '/^\[tool\.setuptools_scm\]/a fallback_version = "%{version}"' pyproject.toml + fi +fi + %build -%py3_build +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" +%pyproject_build %install -%py3_install +export PYTHONDONTWRITEBYTECODE=1 + +# Clean __pycache__ directories and .pyc/.pyo files +find %{buildroot} -name '*.py[co]' -delete +find %{buildroot} -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" +%pyproject_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi @@ -66,30 +88,10 @@ mv %{buildroot}/doclist.lst . %files -n python3-pdfminer.six -f filelist.lst -%dir %{python3_sitelib}/* +%exclude %{python3_sitelib}/__pycache__/ +%exclude %{python3_sitelib}/__pycache__/* -%files help -f doclist.lst -%{_docdir}/* %changelog -* Wed Aug 13 2025 lvfei - 20250324-1 -- Update package to version 20250324 -- Using absolute instead of relative imports -- when corrupt PDF object reference cannot be parsed as int -- when corrupt PDF specifies text-positioning operators with invalid values - -* Tue Feb 11 2025 Xinwei Hu - 20240706-2 -- BuildRequires python-setuptools-git-versioning - -* Mon Aug 12 2024 dongqi - 20240706-1 -- Update package to version 20240706 -- Support for zipped jpeg's -- Fuzzing harnesses for integration into Google's OSS-Fuzz -- Support for setuptools-git-versioning version 2.0.0 - -* Tue Apr 23 2024 zhaojingyu - 20231228-1 -- Update package to version 20231228 -- Added output converter for the hOCR format - -* Tue Nov 7 2023 Dongxing Wang - 20221105-1 -- Init package +* Thu Nov 27 2025 zhangzeyang0718 - 20251107-1 +- Update package to version 20251107