Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-PyLaTeX for openSUSE:Factory 
checked in at 2021-03-03 18:33:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyLaTeX (Old)
 and      /work/SRC/openSUSE:Factory/.python-PyLaTeX.new.2378 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-PyLaTeX"

Wed Mar  3 18:33:47 2021 rev:6 rq:875539 version:1.4.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyLaTeX/python-PyLaTeX.changes    
2021-01-13 18:30:39.681875005 +0100
+++ /work/SRC/openSUSE:Factory/.python-PyLaTeX.new.2378/python-PyLaTeX.changes  
2021-03-03 18:34:06.087343981 +0100
@@ -1,0 +2,8 @@
+Fri Feb 26 20:15:47 UTC 2021 - Ben Greiner <c...@bnavigator.de>
+
+- Some optional dependencies not available for the python36 flavor:
+  * add skip-optional-dependencies-test.patch
+  * don't install numpy, matplotlib and quantities for python36
+    (NumPy 1.20 does not provide a Python 3.6 build on TW: NEP 29)
+
+-------------------------------------------------------------------

New:
----
  skip-optional-dependencies-test.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-PyLaTeX.spec ++++++
--- /var/tmp/diff_new_pack.MqGTik/_old  2021-03-03 18:34:07.627345099 +0100
+++ /var/tmp/diff_new_pack.MqGTik/_new  2021-03-03 18:34:07.631345102 +0100
@@ -25,6 +25,8 @@
 License:        MIT
 URL:            https://github.com/JelteF/PyLaTeX
 Source:         
https://github.com/JelteF/PyLaTeX/archive/v%{version}.tar.gz#/PyLaTeX-%{version}.tar.gz
+# PATCH-FEATURE-OPENSUSE skip-optional-dependencies-test.patch -- skip testing 
optional dependencies if not available
+Patch0:         skip-optional-dependencies-test.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
@@ -65,12 +67,12 @@
 Recommends:     tex(xcolor.sty)
 BuildArch:      noarch
 # SECTION test requirements
-BuildRequires:  %{python_module matplotlib}
-BuildRequires:  %{python_module numpy}
 BuildRequires:  %{python_module ordered-set}
 BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module quantities}
 BuildRequires:  texlive-latex
+BuildRequires:  %{python_module matplotlib if (%python-base without 
python36-base)}
+BuildRequires:  %{python_module numpy if (%python-base without python36-base)}
+BuildRequires:  %{python_module quantities  if (%python-base without 
python36-base)}
 BuildRequires:  tex(amsmath.sty)
 BuildRequires:  tex(booktabs.sty)
 BuildRequires:  tex(cleveref.sty)
@@ -107,7 +109,7 @@
 PyLaTeX is a Python library for creating and compiling LaTeX files.
 
 %prep
-%setup -q -n PyLaTeX-%{version}
+%autosetup -p1 -n PyLaTeX-%{version}
 
 %build
 %python_build

++++++ skip-optional-dependencies-test.patch ++++++
Index: PyLaTeX-1.4.1/tests/test_args.py
===================================================================
--- PyLaTeX-1.4.1.orig/tests/test_args.py
+++ PyLaTeX-1.4.1/tests/test_args.py
@@ -8,9 +8,7 @@ still exist. An error from this file mea
 changed.
 """
 
-import numpy as np
-import quantities as pq
-import matplotlib
+import pytest
 
 from pylatex import Document, Section, Math, Tabular, Figure, SubFigure, \
     Package, TikZ, Axis, Plot, Itemize, Enumerate, Description, MultiColumn, \
@@ -25,9 +23,6 @@ from pylatex import Document, Section, M
 from pylatex.utils import escape_latex, fix_filename, dumps_list, bold, \
     italic, verbatim, NoEscape
 
-matplotlib.use('Agg')  # Not to use X server. For TravisCI.
-import matplotlib.pyplot as pyplot  # noqa
-
 
 def test_document():
     geometry_options = {
@@ -76,6 +71,7 @@ def test_hyperref():
 
 
 def test_math():
+    np = pytest.importorskip("numpy")
     math = Math(data=None, inline=False)
     repr(math)
 
@@ -148,6 +144,12 @@ def test_command():
 
 
 def test_graphics():
+    mpl = pytest.importorskip("matplotlib")
+
+    mpl.use('Agg')  # Not to use X server. For TravisCI.
+
+    import matplotlib.pyplot as pyplot  # noqa
+
     f = Figure(data=None, position=None)
 
     f.add_image(filename='', width=r'0.8\textwidth', placement=r'\centering')
@@ -183,6 +185,7 @@ def test_graphics():
 
 
 def test_quantities():
+    pq = pytest.importorskip("quantities")
     # Quantities
     Quantity(quantity=1*pq.kg)
     q = Quantity(quantity=1*pq.kg, format_cb=lambda x: str(int(x)))
Index: PyLaTeX-1.4.1/tests/test_quantities.py
===================================================================
--- PyLaTeX-1.4.1.orig/tests/test_quantities.py
+++ PyLaTeX-1.4.1/tests/test_quantities.py
@@ -1,5 +1,6 @@
 # -*- coding: utf-8 -*-
-import quantities as pq
+import pytest
+pq = pytest.importorskip("quantities")
 
 from pylatex.quantities import _dimensionality_to_siunitx, Quantity
 

Reply via email to