[packages/python3-platformdirs] - updated to 2.5.1 for python 3.7+
qboosh
qboosh at pld-linux.org
Sun Mar 6 18:31:11 CET 2022
commit 067fe8be615b7daadd281a5606c0ed2ed8d8848a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Mar 6 18:33:02 2022 +0100
- updated to 2.5.1 for python 3.7+
python3-platformdirs.spec | 36 ++++++++++++++++++++++++++++++++----
1 file changed, 32 insertions(+), 4 deletions(-)
---
diff --git a/python3-platformdirs.spec b/python3-platformdirs.spec
index b8edcd0..80cb276 100644
--- a/python3-platformdirs.spec
+++ b/python3-platformdirs.spec
@@ -1,20 +1,38 @@
+# TODO: finish tests and doc
+#
+# Conditional build
+%bcond_with tests # unit tests (need some packages update)
+%bcond_with doc # Sphinx documentation
+
%define module platformdirs
Summary: Python module for determining appropriate platform-specific dirs
Summary(pl.UTF-8): Moduł Pythona do określania odpowiednich katalogów specyficznych dla platformy
Name: python3-%{module}
-Version: 2.4.0
+Version: 2.5.1
Release: 1
License: MIT
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/platformdirs/
Source0: https://files.pythonhosted.org/packages/source/p/platformdirs/%{module}-%{version}.tar.gz
-# Source0-md5: 4e5b836d19600cc4bf0b789ab1de3b51
+# Source0-md5: 83d3ce3feb4af1ccfaca24375574f44d
URL: https://pypi.org/project/platformdirs/
-BuildRequires: python3-modules >= 1:3.6
+BuildRequires: python3-modules >= 1:3.7
BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-appdirs = 1.4.4
+BuildRequires: python3-pytest >= 6
+BuildRequires: python3-pytest-cov >= 2.7
+BuildRequires: python3-pytest-mock >= 3.6
+%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
-Requires: python3-modules >= 1:3.6
+%if %{with doc}
+BuildRequires: python3-furo >= 2021.7.5b38
+BuildRequires: python3-proselint >= 0.10.2
+BuildRequires: python3-sphinx-autodoc-typehints >= 1.12
+BuildRequires: sphinx-pdg >= 4
+%endif
+Requires: python3-modules >= 1:3.7
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -32,6 +50,16 @@ dla platformy, np. "katalog danych użytkownika".
%build
%py3_build
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=pytest_cov.plugin,pytest_mock \
+%{__python3} -m pytest tests
+%endif
+
+%if %{with doc}
+sphinx-build -b html -d docs/_build/doctree docs docs/_build/html
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-platformdirs.git/commitdiff/067fe8be615b7daadd281a5606c0ed2ed8d8848a
More information about the pld-cvs-commit
mailing list