4 %bcond_without tests # unit tests (250+ processes created, max processes ulimit must allow it)
5 %bcond_with doc # Sphinx documentation
7 Summary: A platform independent file lock
8 Summary(pl.UTF-8): Niezależne od platformy blokady plikowe
12 License: Public Domain
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/filelock/
15 Source0: https://files.pythonhosted.org/packages/source/f/filelock/filelock-%{version}.tar.gz
16 # Source0-md5: b1032075ddada92874377426337c38a6
17 URL: https://pypi.org/project/filelock/
18 BuildRequires: python3-modules >= 1:3.7
19 BuildRequires: python3-setuptools
21 BuildRequires: python3-pytest >= 4
22 BuildRequires: python3-pytest-timeout >= 1.4.2
24 BuildRequires: rpm-pythonprov
25 BuildRequires: rpmbuild(macros) >= 1.714
27 BuildRequires: python3-furo >= 2021.8.17b43
28 BuildRequires: python3-sphinx-autodoc-typehints >= 1.12
29 BuildRequires: sphinx-pdg >= 4.1
31 Requires: python3-modules >= 1:3.7
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 This package contains a single module, which implements a platform
37 independent file lock in Python, which provides a simple way of
38 inter-process communication.
40 %description -l pl.UTF-8
41 Ten pakiet zawiera pojedynczny moduł implementujący niezależne od
42 platformy blokady plikowe w Pythonie. Zapewniają one prosty sposób
43 komunikacji międzyprocesowej.
46 %setup -q -n filelock-%{version}
52 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
53 PYTEST_PLUGINS=pytest_timeout \
54 PYTHONPATH=$(pwd)/src \
55 %{__python3} -m pytest tests
59 sphinx-build -b html -d docs/_build/doctree docs docs/_build/html
63 rm -rf $RPM_BUILD_ROOT
68 rm -rf $RPM_BUILD_ROOT
71 %defattr(644,root,root,755)
72 %doc LICENSE README.md
73 %{py3_sitescriptdir}/filelock
74 %{py3_sitescriptdir}/filelock-%{version}-py*.egg-info