forked from pool/python-PyLaTeX
- 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
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:79f1c94ed7c251378d1a4008635b3123191dbe65bac79c9aaeb0eaefbdfcf13c
|
||||
size 301482
|
3
PyLaTeX-1.4.2.tar.gz
Normal file
3
PyLaTeX-1.4.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:441ccfa6afd350441a81c7d2d4103e307ce9e95cd00c413d7db552a7257f220a
|
||||
size 307158
|
@@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 16 04:11:23 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- 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 <code@bnavigator.de>
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user