]>
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 | |
e8fce8d2 JB |
10 | Version: 3.7.1 |
11 | Release: 1 | |
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 | |
e8fce8d2 | 16 | # Source0-md5: cda4ead6a7ee1e6103d27aaf67c8d327 |
ca3a53d5 JB |
17 | URL: https://pypi.org/project/filelock/ |
18 | BuildRequires: python3-modules >= 1:3.7 | |
6b3ee063 JB |
19 | BuildRequires: python3-setuptools >= 1:41.0.0 |
20 | BuildRequires: python3-setuptools_scm >= 2 | |
ca3a53d5 JB |
21 | %if %{with tests} |
22 | BuildRequires: python3-pytest >= 4 | |
23 | BuildRequires: python3-pytest-timeout >= 1.4.2 | |
24 | %endif | |
25 | BuildRequires: rpm-pythonprov | |
26 | BuildRequires: rpmbuild(macros) >= 1.714 | |
27 | %if %{with doc} | |
28 | BuildRequires: python3-furo >= 2021.8.17b43 | |
29 | BuildRequires: python3-sphinx-autodoc-typehints >= 1.12 | |
30 | BuildRequires: sphinx-pdg >= 4.1 | |
31 | %endif | |
32 | Requires: python3-modules >= 1:3.7 | |
33 | BuildArch: noarch | |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %description | |
37 | This package contains a single module, which implements a platform | |
38 | independent file lock in Python, which provides a simple way of | |
39 | inter-process communication. | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | Ten pakiet zawiera pojedynczny moduł implementujący niezależne od | |
43 | platformy blokady plikowe w Pythonie. Zapewniają one prosty sposób | |
44 | komunikacji międzyprocesowej. | |
45 | ||
46 | %prep | |
47 | %setup -q -n filelock-%{version} | |
48 | ||
49 | %build | |
50 | %py3_build | |
51 | ||
52 | %if %{with tests} | |
53 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
54 | PYTEST_PLUGINS=pytest_timeout \ | |
55 | PYTHONPATH=$(pwd)/src \ | |
56 | %{__python3} -m pytest tests | |
57 | %endif | |
58 | ||
59 | %if %{with doc} | |
60 | sphinx-build -b html -d docs/_build/doctree docs docs/_build/html | |
61 | %endif | |
62 | ||
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %py3_install | |
67 | ||
68 | %clean | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %files | |
72 | %defattr(644,root,root,755) | |
73 | %doc LICENSE README.md | |
74 | %{py3_sitescriptdir}/filelock | |
75 | %{py3_sitescriptdir}/filelock-%{version}-py*.egg-info |