[packages/python-pickleshare] - updated to 0.7.5, enabled tests
qboosh
qboosh at pld-linux.org
Thu Sep 19 05:44:56 CEST 2019
commit bb2dd6df6af252a1fb0e903443084581831025b3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Sep 19 05:47:56 2019 +0200
- updated to 0.7.5, enabled tests
python-pickleshare.spec | 110 ++++++++++++++++++++++--------------------------
1 file changed, 50 insertions(+), 60 deletions(-)
---
diff --git a/python-pickleshare.spec b/python-pickleshare.spec
index 0f385b6..edbed77 100644
--- a/python-pickleshare.spec
+++ b/python-pickleshare.spec
@@ -1,35 +1,38 @@
-# TODO:
-# - fix tests
-
+#
# Conditional build:
-%bcond_with doc # don't build doc
-%bcond_with tests # do not perform "make test"
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%define module pickleshare
Summary: A small 'shelve' like datastore with concurrency support
-Summary(pl.UTF-8): Mały, podobny do 'shelve', zarządca danych z wsparciem dla konkurencyjności
+Summary(pl.UTF-8): Mały, podobny do 'shelve', zarządca danych z obsługą współbieżności
Name: python-%{module}
-Version: 0.7.4
-Release: 2
+Version: 0.7.5
+Release: 1
License: MIT
Group: Libraries/Python
-Source0: https://github.com/pickleshare/pickleshare/archive/%{version}.tar.gz
-# Source0-md5: edd1fc04bc12d9748c852218d2cb86fd
+#Source0Download: https://github.com/pickleshare/pickleshare/releases
+Source0: https://github.com/pickleshare/pickleshare/archive/%{version}/%{module}-%{version}.tar.gz
+# Source0-md5: 79387de9fd8cc26e29d5cae9fc2fab9d
URL: https://github.com/pickleshare/pickleshare
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
%if %{with python2}
-BuildRequires: python-modules
+BuildRequires: python-modules >= 1:2.6
BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-pathlib2
+%endif
%endif
%if %{with python3}
-BuildRequires: python3-modules
+BuildRequires: python3-modules >= 1:3.2
BuildRequires: python3-setuptools
+%if %{with tests} && "%{py3_ver}" < "3.4"
+BuildRequires: python3-pathlib2
+%endif
%endif
-Requires: python-modules
-Requires: python-pathlib2
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires: python-modules >= 1:2.6
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -41,15 +44,20 @@ the same database. Concurrency is possible because the values are
stored in separate files. Hence the "database" is a directory where
all files are governed by PickleShare.
-# %%description -l pl.UTF-8
+%description -l pl.UTF-8
+Obiekt PickleShareDB działa jak zwykły słownik. W przeciwieństwie do
+shelve, wiele procesów może jednocześnie odwoływać się do bazy danych.
+Zmiana wartości w bazie danych jest natychmiast widoczna dla innych
+procesów odwołujących się do tej samej bazy. Współbieżność jest
+możliwa, ponieważ wartości są zapisane w osobnych plikach. Stąd "baza
+dnaych" to katalog, gdzie znajdują się wszystkie pliki utrzymywane
+przez PickleShare.
%package -n python3-%{module}
-Summary: -
-Summary(pl.UTF-8): -
+Summary: A small 'shelve' like datastore with concurrency support
+Summary(pl.UTF-8): Mały, podobny do 'shelve', zarządca danych z obsługą współbieżności
Group: Libraries/Python
-Requires: python3-modules
-Requires: python3-pathlib2
-
+Requires: python3-modules >= 1:3.2
%description -n python3-%{module}
PickleShareDB object acts like a normal dictionary. Unlike shelve,
@@ -59,36 +67,29 @@ the same database. Concurrency is possible because the values are
stored in separate files. Hence the "database" is a directory where
all files are governed by PickleShare.
-# %%description -n python3-%{module} -l pl.UTF-8
-
-%package apidocs
-Summary: %{module} API documentation
-Summary(pl.UTF-8): Dokumentacja API %{module}
-Group: Documentation
-
-%description apidocs
-API documentation for %{module}.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API %{module}.
+%description -n python3-%{module} -l pl.UTF-8
+Obiekt PickleShareDB działa jak zwykły słownik. W przeciwieństwie do
+shelve, wiele procesów może jednocześnie odwoływać się do bazy danych.
+Zmiana wartości w bazie danych jest natychmiast widoczna dla innych
+procesów odwołujących się do tej samej bazy. Współbieżność jest
+możliwa, ponieważ wartości są zapisane w osobnych plikach. Stąd "baza
+dnaych" to katalog, gdzie znajdują się wszystkie pliki utrzymywane
+przez PickleShare.
%prep
%setup -q -n %{module}-%{version}
-
%build
%if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%{?with_tests:%{__python} -m pytest test_pickleshare.py}
%endif
%if %{with python3}
-%py3_build %{?with_tests:test}
-%endif
+%py3_build
-%if %{with doc}
-cd docs
-%{__make} -j1 html
-rm -rf _build/html/_sources
+%{?with_tests:%{__python3} -m pytest test_pickleshare.py}
%endif
%install
@@ -97,9 +98,6 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%py_install
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-
%py_postclean
%endif
@@ -113,24 +111,16 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc README.md
-%{py_sitescriptdir}/%{module}.py*
-%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%doc LICENSE README.md
+%{py_sitescriptdir}/pickleshare.py[co]
+%{py_sitescriptdir}/pickleshare-%{version}-py*.egg-info
%endif
%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
-%doc README.md
-%{py3_sitescriptdir}/%{module}.py
-%{py3_sitescriptdir}/__pycache__/%{module}.*.pyc
-
-
-%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
-%endif
-
-%if %{with doc}
-%files apidocs
-%defattr(644,root,root,755)
-%doc docs/_build/html/*
+%doc LICENSE README.md
+%{py3_sitescriptdir}/pickleshare.py
+%{py3_sitescriptdir}/__pycache__/pickleshare.cpython-*.pyc
+%{py3_sitescriptdir}/pickleshare-%{version}-py*.egg-info
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pickleshare.git/commitdiff/bb2dd6df6af252a1fb0e903443084581831025b3
More information about the pld-cvs-commit
mailing list