Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pdfminer.six for
openSUSE:Factory checked in at 2021-11-09 23:54:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pdfminer.six (Old)
and /work/SRC/openSUSE:Factory/.python-pdfminer.six.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pdfminer.six"
Tue Nov 9 23:54:53 2021 rev:4 rq:930278 version:20200726
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pdfminer.six/python-pdfminer.six.changes
2020-09-09 18:08:06.875535265 +0200
+++
/work/SRC/openSUSE:Factory/.python-pdfminer.six.new.1890/python-pdfminer.six.changes
2021-11-09 23:55:18.807974120 +0100
@@ -1,0 +2,7 @@
+Tue Nov 9 07:32:27 UTC 2021 - Steve Kowalik <[email protected]>
+
+- Use pytest to run the testsuite.
+- Add patch import-from-non-pythonpath-files.patch:
+ * Allow the test suite to find modules not shipped as modules.
+
+-------------------------------------------------------------------
New:
----
import-from-non-pythonpath-files.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pdfminer.six.spec ++++++
--- /var/tmp/diff_new_pack.lohhXD/_old 2021-11-09 23:55:19.275974358 +0100
+++ /var/tmp/diff_new_pack.lohhXD/_new 2021-11-09 23:55:19.275974358 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pdfminer.six
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -27,9 +27,9 @@
Source:
https://github.com/pdfminer/pdfminer.six/archive/%{version}.tar.gz#/pdfminer.six-%{version}.tar.gz
# https://github.com/pdfminer/pdfminer.six/pull/489
Patch0: python-pdfminer.six-remove-nose.patch
+Patch1: import-from-non-pythonpath-files.patch
BuildRequires: %{python_module chardet}
BuildRequires: %{python_module cryptography}
-BuildRequires: %{python_module nose}
BuildRequires: %{python_module pycryptodome}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
@@ -43,7 +43,7 @@
Requires: python-six
Requires: python-sortedcontainers
Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
Provides: python-pdfminer3k = %{version}
Obsoletes: python-pdfminer3k < %{version}
BuildArch: noarch
@@ -63,7 +63,7 @@
%prep
%setup -q -n pdfminer.six-%{version}
-%patch0 -p1
+%autopatch -p1
sed -i -e '/^#!\//, 1d' pdfminer/psparser.py
sed -i '1i #!%{_bindir}/python3' tools/dumppdf.py tools/pdf2txt.py
@@ -80,7 +80,7 @@
%python_clone -a %{buildroot}%{_bindir}/dumppdf
%check
-%python_expand nosetests-%{$python_bin_suffix} -v
+%pytest
%post
%python_install_alternative pdf2txt
++++++ import-from-non-pythonpath-files.patch ++++++
Index: pdfminer.six-20200726/tests/test_tools_dumppdf.py
===================================================================
--- pdfminer.six-20200726.orig/tests/test_tools_dumppdf.py
+++ pdfminer.six-20200726/tests/test_tools_dumppdf.py
@@ -5,8 +5,11 @@ from tempfile import NamedTemporaryFile
from helpers import absolute_sample_path
from pdfminer.pdfdocument import PDFNoValidXRefWarning
-from tools import dumppdf
+import importlib.util
+spec = importlib.util.spec_from_file_location("dumppdf", "tools/dumppdf.py")
+dumppdf = importlib.util.module_from_spec(spec)
+spec.loader.exec_module(dumppdf)
def run(filename, options=None):
absolute_path = absolute_sample_path(filename)
Index: pdfminer.six-20200726/tests/test_tools_pdf2txt.py
===================================================================
--- pdfminer.six-20200726.orig/tests/test_tools_pdf2txt.py
+++ pdfminer.six-20200726/tests/test_tools_pdf2txt.py
@@ -4,9 +4,13 @@ import os
from shutil import rmtree
from tempfile import NamedTemporaryFile, mkdtemp
-import tools.pdf2txt as pdf2txt
from helpers import absolute_sample_path
+import importlib.util
+spec = importlib.util.spec_from_file_location("pdf2txt", "tools/pdf2txt.py")
+pdf2txt = importlib.util.module_from_spec(spec)
+spec.loader.exec_module(pdf2txt)
+
def run(sample_path, options=None):
absolute_path = absolute_sample_path(sample_path)