[packages/python-zc.lockfile] - updated to 2.0, finished packaging

qboosh qboosh at pld-linux.org
Sat May 17 21:28:37 CEST 2025


commit 949a85058d96f5a54e1aa61b525e149b92e88ecb
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat May 17 21:21:43 2025 +0200

    - updated to 2.0, finished packaging

 python-zc.lockfile.spec | 142 +++++++++++++++++++++++-------------------------
 1 file changed, 69 insertions(+), 73 deletions(-)
---
diff --git a/python-zc.lockfile.spec b/python-zc.lockfile.spec
index e1d955e..e28c6f3 100644
--- a/python-zc.lockfile.spec
+++ b/python-zc.lockfile.spec
@@ -1,77 +1,91 @@
-# TODO:
-# - fix tests - zope.testing upgrade needed ?
-
-%bcond_with	doc	# don't build doc
-%bcond_with	tests	# do not perform "make test"
+#
+# Conditional build:
+%bcond_without	tests	# unit tests
 %bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
 
 %define		module		zc.lockfile
-%define		egg_name	zc.lockfile
-%define		pypi_name	zc.lockfile
 Summary:	Basic inter-process locks
 Summary(pl.UTF-8):	Podstawowe blokady pomiędzy procesami 
-Name:		python-%{pypi_name}
-Version:	1.2.1
-Release:	8
-License:	ZPL 2.1
+Name:		python-%{module}
+# keep 2.x here for python2 support
+Version:	2.0
+Release:	1
+License:	ZPL v2.1
 Group:		Libraries/Python
-Source0:	https://files.pythonhosted.org/packages/source/z/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
-# Source0-md5:	163f0293d53a84f608f9008d9c0afc60
-URL:		https://pypi.python.org/pypi/%{pypi_name}
+#Source0Download: https://pypi.org/simple/zc.lockfile/
+Source0:	https://files.pythonhosted.org/packages/source/z/zc.lockfile/%{module}-%{version}.tar.gz
+# Source0-md5:	3895445752278ddcc4578658c3c9a492
+URL:		https://pypi.org/project/zc.lockfile
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 %if %{with python2}
-BuildRequires:	python-modules
+BuildRequires:	python-modules >= 1:2.7
 BuildRequires:	python-setuptools
-BuildRequires:	python-zope.exceptions
+%if %{with tests}
+BuildRequires:	python-mock
 BuildRequires:	python-zope.testing
 %endif
+%endif
 %if %{with python3}
-BuildRequires:	python3-modules
+BuildRequires:	python3-modules >= 1:3.5
 BuildRequires:	python3-setuptools
-BuildRequires:	python3-zope.exceptions
+%if %{with tests}
 BuildRequires:	python3-zope.testing
-
 %endif
-# when using /usr/bin/env or other in-place substitutions
-#BuildRequires:        sed >= 4.0
-# replace with other requires if defined in setup.py
-Requires:	python-modules
-Requires:	python-zope.exceptions
-Requires:	python-zope.testing
+%endif
+Requires:	python-modules >= 1:2.7
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
+The zc.lockfile package provides a basic portable implementation of
+interprocess locks using lock files. The purpose if not specifically
+to lock files, but to simply provide locks with an implementation
+based on file-locking primitives. Of course, these locks could be
+used to mediate access to other files. For example, the ZODB file
+storage implementation uses file locks to mediate access to
+file-storage database files. The database files and lock file files
+are separate files.
 
 %description -l pl.UTF-8
-
-%package -n python3-%{pypi_name}
-Summary:	-
-Summary(pl.UTF-8):	-
+Pakiet zc.lockfile zapewnia podstawową, przenośną implementację
+blokad międzyprocesowych przy użyciu plików blokad. Celem nie jest
+samo blokowanie plików, ale po prostu zapewnienie blokad z
+implementacją opartą na blokowaniu plików. Oczywiście te blokady mogą
+służyć do negocjowania dostępu do innych plików. Na przykład
+implementacja przechowywania danych w plikach ZODB wykorzystuje
+blokady plikowe do negocjowania dostępu do plików baz danych. Pliki
+baz danych i pliki blokad to osobne pliki.
+
+%package -n python3-%{module}
+Summary:	Basic inter-process locks
+Summary(pl.UTF-8):	Podstawowe blokady pomiędzy procesami 
 Group:		Libraries/Python
-Requires:	python3-modules
-Requires:	python3-zope.exceptions
-Requires:	python3-zope.testing
-
-%description -n python3-%{pypi_name}
-
-%description -n python3-%{pypi_name} -l pl.UTF-8
-
-%package apidocs
-Summary:	API documentation for Python %{module} module
-Summary(pl.UTF-8):	Dokumentacja API modułu Pythona %{module}
-Group:		Documentation
-
-%description apidocs
-API documentation for Pythona %{module} module.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API modułu Pythona %{module}.
+Requires:	python3-modules >= 1:3.5
+
+%description -n python3-%{module}
+The zc.lockfile package provides a basic portable implementation of
+interprocess locks using lock files. The purpose if not specifically
+to lock files, but to simply provide locks with an implementation
+based on file-locking primitives. Of course, these locks could be
+used to mediate access to other files. For example, the ZODB file
+storage implementation uses file locks to mediate access to
+file-storage database files. The database files and lock file files
+are separate files.
+
+%description -n python3-%{module} -l pl.UTF-8
+Pakiet zc.lockfile zapewnia podstawową, przenośną implementację
+blokad międzyprocesowych przy użyciu plików blokad. Celem nie jest
+samo blokowanie plików, ale po prostu zapewnienie blokad z
+implementacją opartą na blokowaniu plików. Oczywiście te blokady mogą
+służyć do negocjowania dostępu do innych plików. Na przykład
+implementacja przechowywania danych w plikach ZODB wykorzystuje
+blokady plikowe do negocjowania dostępu do plików baz danych. Pliki
+baz danych i pliki blokad to osobne pliki.
 
 %prep
-%setup -q -n %{pypi_name}-%{version}
+%setup -q -n %{module}-%{version}
 
 %build
 %if %{with python2}
@@ -82,24 +96,12 @@ Dokumentacja API modułu Pythona %{module}.
 %py3_build %{?with_tests:test}
 %endif
 
-%if %{with doc}
-cd docs
-%{__make} -j1 html
-rm -rf _build/html/_sources
-%endif
-
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %if %{with python2}
 %py_install
 
-# when files are installed in other way that standard 'setup.py
-# they need to be (re-)compiled
-# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-
 %py_postclean
 %endif
 
@@ -113,25 +115,19 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc CHANGES.txt doc.txt README.txt
+%doc CHANGES.rst COPYRIGHT.txt README.rst
 %dir %{py_sitescriptdir}/zc
 %{py_sitescriptdir}/zc/lockfile
-%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
-%{py_sitescriptdir}/*.pth
+%{py_sitescriptdir}/zc.lockfile-%{version}-py*.egg-info
+%{py_sitescriptdir}/zc.lockfile-%{version}-py*-nspkg.pth
 %endif
 
 %if %{with python3}
-%files -n python3-%{pypi_name}
+%files -n python3-%{module}
 %defattr(644,root,root,755)
-%doc CHANGES.txt doc.txt README.txt
+%doc CHANGES.rst COPYRIGHT.txt README.rst
 %dir %{py3_sitescriptdir}/zc
 %{py3_sitescriptdir}/zc/lockfile
-%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
-%{py3_sitescriptdir}/*.pth
-%endif
-
-%if %{with doc}
-%files apidocs
-%defattr(644,root,root,755)
-%doc docs/_build/html/*
+%{py3_sitescriptdir}/zc.lockfile-%{version}-py*.egg-info
+%{py3_sitescriptdir}/zc.lockfile-%{version}-py*-nspkg.pth
 %endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-zc.lockfile.git/commitdiff/949a85058d96f5a54e1aa61b525e149b92e88ecb



More information about the pld-cvs-commit mailing list