From 220621b69ecc8fa42b4148e2f1f18284d0ba7e719e1e7235a1414c6eec5c7f64 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 16 Feb 2024 04:33:38 +0000 Subject: [PATCH] - Update to 1.4.2: * Add `.Chapter` in ``__init__.py`` * Fix installation on Python 3.12 - Drop patch skip-optional-dependencies-test.patch, no longer required. - Switch to pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyLaTeX?expand=0&rev=13 --- PyLaTeX-1.4.1.tar.gz | 3 -- PyLaTeX-1.4.2.tar.gz | 3 ++ python-PyLaTeX.changes | 9 ++++ python-PyLaTeX.spec | 18 +++----- skip-optional-dependencies-test.patch | 66 --------------------------- 5 files changed, 19 insertions(+), 80 deletions(-) delete mode 100644 PyLaTeX-1.4.1.tar.gz create mode 100644 PyLaTeX-1.4.2.tar.gz delete mode 100644 skip-optional-dependencies-test.patch diff --git a/PyLaTeX-1.4.1.tar.gz b/PyLaTeX-1.4.1.tar.gz deleted file mode 100644 index f6705df..0000000 --- a/PyLaTeX-1.4.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79f1c94ed7c251378d1a4008635b3123191dbe65bac79c9aaeb0eaefbdfcf13c -size 301482 diff --git a/PyLaTeX-1.4.2.tar.gz b/PyLaTeX-1.4.2.tar.gz new file mode 100644 index 0000000..81ab96c --- /dev/null +++ b/PyLaTeX-1.4.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:441ccfa6afd350441a81c7d2d4103e307ce9e95cd00c413d7db552a7257f220a +size 307158 diff --git a/python-PyLaTeX.changes b/python-PyLaTeX.changes index 9b9715e..35ac135 100644 --- a/python-PyLaTeX.changes +++ b/python-PyLaTeX.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Feb 16 04:11:23 UTC 2024 - Steve Kowalik + +- Update to 1.4.2: + * Add `.Chapter` in ``__init__.py`` + * Fix installation on Python 3.12 +- Drop patch skip-optional-dependencies-test.patch, no longer required. +- Switch to pyproject macros. + ------------------------------------------------------------------- Fri Feb 26 20:15:47 UTC 2021 - Ben Greiner diff --git a/python-PyLaTeX.spec b/python-PyLaTeX.spec index e8f910a..2632b78 100644 --- a/python-PyLaTeX.spec +++ b/python-PyLaTeX.spec @@ -1,7 +1,7 @@ # # spec file for package python-PyLaTeX # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,19 +16,17 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 Name: python-PyLaTeX -Version: 1.4.1 +Version: 1.4.2 Release: 0 Summary: A Python library for creating LaTeX files and snippets 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 pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-ordered-set @@ -112,21 +110,19 @@ PyLaTeX is a Python library for creating and compiling LaTeX files. %autosetup -p1 -n PyLaTeX-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# Quantities is an optional dependency that currently doesn't work -# %%python_expand nosetests-%%{$python_bin_suffix} -v -e 'test_quantities' %pytest %files %{python_files} %doc README.rst %license LICENSE %{python_sitelib}/pylatex -%{python_sitelib}/*egg-info +%{python_sitelib}/PyLaTeX-%{version}.dist-info %changelog diff --git a/skip-optional-dependencies-test.patch b/skip-optional-dependencies-test.patch deleted file mode 100644 index bed0a11..0000000 --- a/skip-optional-dependencies-test.patch +++ /dev/null @@ -1,66 +0,0 @@ -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 -