[packages/python-toml] - added pl and tests - added LICENSE and example test.toml file to docs
qboosh
qboosh at pld-linux.org
Thu Feb 4 21:27:24 CET 2021
commit e1b15806fe87c5e4bc9564135bf6257d4bc41050
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Feb 4 21:27:48 2021 +0100
- added pl and tests
- added LICENSE and example test.toml file to docs
python-toml.spec | 32 ++++++++++++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/python-toml.spec b/python-toml.spec
index 5f14291..8945731 100644
--- a/python-toml.spec
+++ b/python-toml.spec
@@ -1,9 +1,12 @@
+#
# Conditional build:
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%define module toml
Summary: Python Library for Tom's Obvious, Minimal Language
+Summary(pl.UTF-8): Pythonowa biblioteka do formatu TOML (Tom's Obvious, Minimal Language)
Name: python-%{module}
Version: 0.10.2
Release: 1
@@ -16,10 +19,16 @@ URL: https://github.com/uiri/toml
%if %{with python2}
BuildRequires: python-modules >= 1:2.6
BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-pytest
+%endif
%endif
%if %{with python3}
BuildRequires: python3-modules >= 1:3.3
BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-pytest
+%endif
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
@@ -30,24 +39,43 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
A Python library for parsing and creating TOML.
+%description -l pl.UTF-8
+Pythonowa biblioteka do analizy i tworzenia plików TOML.
+
%package -n python3-%{module}
Summary: Python Library for Tom's Obvious, Minimal Language
+Summary(pl.UTF-8): Pythonowa biblioteka do formatu TOML (Tom's Obvious, Minimal Language)
Group: Libraries/Python
Requires: python3-modules >= 1:3.3
%description -n python3-%{module}
A Python library for parsing and creating TOML.
+%description -n python3-%{module} -l pl.UTF-8
+Pythonowa biblioteka do analizy i tworzenia plików TOML.
+
%prep
%setup -q -n %{module}-%{version}
%build
%if %{with python2}
%py_build
+
+%if %{with tests}
+# disable test_{valid,invalid}_tests: no toml-test/tests/{valid,invalid} data
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python} -m pytest tests -k 'not (test_invalid_tests or test_valid_tests)'
+%endif
%endif
%if %{with python3}
%py3_build
+
+%if %{with tests}
+# disable test_{valid,invalid}_tests: no toml-test/tests/{valid,invalid} data
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests -k 'not (test_invalid_tests or test_valid_tests)'
+%endif
%endif
%install
@@ -69,7 +97,7 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc README.rst
+%doc LICENSE README.rst test.toml
%{py_sitescriptdir}/%{module}
%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
%endif
@@ -77,7 +105,7 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
-%doc README.rst
+%doc LICENSE README.rst test.toml
%{py3_sitescriptdir}/%{module}
%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-toml.git/commitdiff/e1b15806fe87c5e4bc9564135bf6257d4bc41050
More information about the pld-cvs-commit
mailing list