b354d33
# Enabled by default
b354d33
# If the package needs to download data for the test which cannot be done in
b354d33
# koji, these can be disabled in koji by using `bcond_with` instead, but the
b354d33
# tests must be validated in mock with network enabled like so:
7bb589c
# mock -r fedora-rawhide-x86_64 rebuild <srpm> --enable-network --with tests
b354d33
7bb589c
# Tested for 1.4.2: all tests and examples pass
7bb589c
%bcond tests 0
7bb589c
7bb589c
# unable to use rpmautospec here---fedpkg fails to fetch sources
b354d33
b354d33
%global fancy_name PyLaTeX
b354d33
b354d33
%global _description %{expand:
b354d33
PyLaTeX is a Python library for creating and compiling LaTeX files or snippets.
b354d33
The goal of this library is being an easy but extensible interface between
b354d33
Python and LaTeX.}
b354d33
7bb589c
%global forgeurl https://github.com/JelteF/PyLaTeX
7bb589c
7bb589c
Name:           python-pylatex
7bb589c
Version:        1.4.2
7bb589c
Release:        1%{?dist}
b354d33
Summary:        Library for creating LaTeX files and snippets
b354d33
7bb589c
%forgemeta
7bb589c
7bb589c
# spdx
b354d33
License:        MIT
b354d33
URL:            https://jeltef.github.io/PyLaTeX/
7bb589c
Source0:        %forgesource
b354d33
BuildArch:      noarch
b354d33
b354d33
%description %_description
b354d33
b354d33
%{?python_enable_dependency_generator}
b354d33
7bb589c
%package -n python3-pylatex
b354d33
Summary:        %{summary}
b354d33
# Not picked up by dep generator
b354d33
Requires:       %{py3_dist matplotlib}
b354d33
Requires:       %{py3_dist quantities}
b354d33
Requires:       %{py3_dist numpy}
b354d33
# Will also pull a lot of texlive, but that cannot be helpeb
b354d33
Requires:       /usr/bin/latexmk
b354d33
Requires:       /usr/bin/pdflatex
b354d33
# From `ag Package`
b354d33
Requires:       tex(alltt.sty)
b354d33
Requires:       tex(amsmath.sty)
b354d33
Requires:       tex(booktabs.sty)
b354d33
Requires:       tex(cleveref.sty)
b354d33
Requires:       tex(enumitem.sty)
b354d33
Requires:       tex(fontenc.sty)
b354d33
Requires:       tex(fancyhdr.sty)
b354d33
Requires:       tex(geometry.sty)
b354d33
Requires:       tex(graphicx.sty)
b354d33
Requires:       tex(hyperref.sty)
b354d33
Requires:       tex(inputenc.sty)
b354d33
Requires:       tex(lmodern.sty)
b354d33
Requires:       tex(lastpage.sty)
b354d33
Requires:       tex(longtable.sty)
b354d33
Requires:       tex(ltablex.sty)
b354d33
Requires:       tex(mdframed.sty)
b354d33
Requires:       tex(microtype.sty)
b354d33
Requires:       tex(multirow.sty)
b354d33
Requires:       tex(parskip.sty)
b354d33
Requires:       tex(pgfplots.sty)
b354d33
Requires:       tex(ragged2e.sty)
b354d33
Requires:       tex(subcaption.sty)
b354d33
Requires:       tex(siunitx.sty)
b354d33
Requires:       tex(tabularx.sty)
b354d33
Requires:       tex(tabu.sty)
b354d33
Requires:       tex(textcomp.sty)
b354d33
Requires:       tex(textpos.sty)
b354d33
Requires:       tex(tikz.sty)
b354d33
Requires:       tex(xcolor.sty)
b354d33
Requires:       texlive
b354d33
b354d33
BuildRequires:  python3-devel
8968032
BuildRequires:  python3-setuptools
b354d33
%if %{with tests}
b354d33
# Explicit requirements for tests
b354d33
BuildRequires:  %{py3_dist matplotlib}
b354d33
BuildRequires:  %{py3_dist numpy}
6f28dc1
BuildRequires:  %{py3_dist pytest}
b354d33
BuildRequires:  %{py3_dist quantities}
b354d33
# https://fedoraproject.org/wiki/Features/TeXLive
b354d33
BuildRequires:  tex(alltt.sty)
b354d33
BuildRequires:  tex(amsmath.sty)
b354d33
BuildRequires:  tex(booktabs.sty)
b354d33
BuildRequires:  tex(cleveref.sty)
b354d33
BuildRequires:  tex(enumitem.sty)
b354d33
BuildRequires:  tex(fontenc.sty)
b354d33
BuildRequires:  tex(fancyhdr.sty)
b354d33
BuildRequires:  tex(geometry.sty)
b354d33
BuildRequires:  tex(graphicx.sty)
b354d33
BuildRequires:  tex(hyperref.sty)
b354d33
BuildRequires:  tex(inputenc.sty)
b354d33
BuildRequires:  tex(lmodern.sty)
b354d33
BuildRequires:  tex(lastpage.sty)
b354d33
BuildRequires:  tex(longtable.sty)
b354d33
BuildRequires:  tex(ltablex.sty)
b354d33
BuildRequires:  tex(mdframed.sty)
b354d33
BuildRequires:  tex(microtype.sty)
b354d33
BuildRequires:  tex(multirow.sty)
b354d33
BuildRequires:  tex(parskip.sty)
b354d33
BuildRequires:  tex(pgfplots.sty)
b354d33
BuildRequires:  tex(ragged2e.sty)
b354d33
BuildRequires:  tex(subcaption.sty)
b354d33
BuildRequires:  tex(siunitx.sty)
b354d33
BuildRequires:  tex(tabularx.sty)
b354d33
BuildRequires:  tex(tabu.sty)
b354d33
BuildRequires:  tex(textcomp.sty)
b354d33
BuildRequires:  tex(textpos.sty)
b354d33
BuildRequires:  tex(tikz.sty)
b354d33
BuildRequires:  tex(xcolor.sty)
b354d33
BuildRequires:  texlive
b354d33
%endif
b354d33
7bb589c
%py_provides python3-pylatex
b354d33
7bb589c
%description -n python3-pylatex %_description
b354d33
b354d33
%prep
7bb589c
%forgesetup
b354d33
b354d33
# Comment out to remove /usr/bin/env shebangs
b354d33
# Can use something similar to correct/remove /usr/bin/python shebangs also
b354d33
# find . -type f -name "*.py" -exec sed -i '/^#![  ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'
b354d33
7bb589c
%generate_buildrequires
7bb589c
%pyproject_buildrequires
7bb589c
b354d33
%build
7bb589c
%pyproject_wheel
7bb589c
b354d33
b354d33
%install
7bb589c
%pyproject_install
7bb589c
%pyproject_save_files -l pylatex
b354d33
b354d33
b354d33
%check
b354d33
%if %{with tests}
b354d33
# Run tests
8c322ab
%pytest
b354d33
b354d33
# Test examples
b354d33
pushd examples
b354d33
for f in *.py; do
b354d33
    PYTHONPATH=%{buildroot}/%{python3_sitelib} %{__python3} $f
b354d33
done
b354d33
popd
b354d33
%endif
b354d33
7bb589c
%files -n python3-pylatex -f %{pyproject_files}
b354d33
%doc README.rst
b354d33
b354d33
%changelog
7bb589c
* Tue Feb 20 2024 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.2-1
7bb589c
- Update to latest release
7bb589c
226722c
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-13
226722c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
226722c
c047659
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-12
c047659
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
c047659
372fd0b
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-11
372fd0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
372fd0b
3768536
* Tue Jun 27 2023 Python Maint <python-maint@redhat.com> - 1.4.1-10
3768536
- Rebuilt for Python 3.12
3768536
cb20892
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-9
cb20892
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
cb20892
949471f
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-8
949471f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
949471f
f8798e4
* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 1.4.1-7
f8798e4
- Rebuilt for Python 3.11
f8798e4
8c322ab
* Wed Mar 16 2022 Charalampos Stratakis <cstratak@redhat.com> - 1.4.1-6
8c322ab
- Utilize pytest instead of the deprecated nose test runner
8c322ab
8ab4dea
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-5
8ab4dea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
8ab4dea
204e45c
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-4
204e45c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
204e45c
d338470
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.4.1-3
d338470
- Rebuilt for Python 3.10
d338470
9b9b2cd
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-2
9b9b2cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
9b9b2cd
0ba0c67
* Sat Nov 28 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.1-1
0ba0c67
- Update to latest release
0ba0c67
6f28dc1
* Thu Oct 01 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.4.0-1
6f28dc1
- Update to new release
6f28dc1
2e2bf9f
* Sat Aug 22 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.3.4-1
2e2bf9f
- Update to new release
2e2bf9f
c45a9fa
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.3-3
c45a9fa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c45a9fa
8968032
* Thu Jun 25 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.3.3-2
8968032
- Explicitly BR setuptools
8968032
b4974ed
* Sun Jun 21 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.3.3-1
b4974ed
- Update to 1.3.3
b4974ed
843fbad
* Mon Jun 15 2020 Victor Tejada Yau <victortyau@gmail.com> 1.3.2-1
b4974ed
- Update to 1.3.2
843fbad
6f14d37
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.3.1-3
6f14d37
- Rebuilt for Python 3.9
6f14d37
c05f8b9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
c05f8b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
c05f8b9
36e1368
* Thu Oct 10 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.3.1-1
36e1368
- Update to 1.3.1
36e1368
9d8be65
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.3.0-3
9d8be65
- Rebuilt for Python 3.8
9d8be65
f937fb9
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-2
f937fb9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
f937fb9
b354d33
* Tue Jun 18 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.3.0-1
b354d33
- Minor tweaks as per review comments
b354d33
- https://bugzilla.redhat.com/show_bug.cgi?id=1721409
b354d33
- Improve description macro
b354d33
b354d33
* Mon Jun 17 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.3.0-1
b354d33
- Initial rpm build