]>
Commit | Line | Data |
---|---|---|
ca3a53d5 JB |
1 | # TODO: finish doc |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_without tests # unit tests (250+ processes created, max processes ulimit must allow it) | |
5 | %bcond_with doc # Sphinx documentation | |
6 | ||
7 | Summary: A platform independent file lock | |
8 | Summary(pl.UTF-8): Niezależne od platformy blokady plikowe | |
9 | Name: python3-filelock | |
10 | Version: 3.6.0 | |
a21d854f | 11 | Release: 3 |
ca3a53d5 JB |
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 | |
20 | %if %{with tests} | |
21 | BuildRequires: python3-pytest >= 4 | |
22 | BuildRequires: python3-pytest-timeout >= 1.4.2 | |
23 | %endif | |
24 | BuildRequires: rpm-pythonprov | |
25 | BuildRequires: rpmbuild(macros) >= 1.714 | |
26 | %if %{with doc} | |
27 | BuildRequires: python3-furo >= 2021.8.17b43 | |
28 | BuildRequires: python3-sphinx-autodoc-typehints >= 1.12 | |
29 | BuildRequires: sphinx-pdg >= 4.1 | |
30 | %endif | |
31 | Requires: python3-modules >= 1:3.7 | |
32 | BuildArch: noarch | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
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. | |
39 | ||
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. | |
44 | ||
45 | %prep | |
46 | %setup -q -n filelock-%{version} | |
47 | ||
48 | %build | |
49 | %py3_build | |
50 | ||
51 | %if %{with tests} | |
52 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
53 | PYTEST_PLUGINS=pytest_timeout \ | |
54 | PYTHONPATH=$(pwd)/src \ | |
55 | %{__python3} -m pytest tests | |
56 | %endif | |
57 | ||
58 | %if %{with doc} | |
59 | sphinx-build -b html -d docs/_build/doctree docs docs/_build/html | |
60 | %endif | |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %py3_install | |
66 | ||
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %files | |
71 | %defattr(644,root,root,755) | |
72 | %doc LICENSE README.md | |
73 | %{py3_sitescriptdir}/filelock | |
74 | %{py3_sitescriptdir}/filelock-%{version}-py*.egg-info |