]>
Commit | Line | Data |
---|---|---|
a93e6fa9 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
d2f5553e | 5 | %bcond_without tests # unit tests (250+ processes created, max processes ulimit must allow it) |
a93e6fa9 JB |
6 | |
7 | Summary: A platform independent file lock | |
8 | Summary(pl.UTF-8): Niezależne od platformy blokady plikowe | |
9 | Name: python-filelock | |
d2f5553e JB |
10 | Version: 3.0.12 |
11 | Release: 1 | |
12 | License: Public Domain | |
a93e6fa9 JB |
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 | |
d2f5553e | 16 | # Source0-md5: c1fe6d9a7433a7ca6ce4f36e273317d1 |
a93e6fa9 JB |
17 | URL: https://pypi.org/project/filelock/ |
18 | BuildRequires: rpm-pythonprov | |
19 | BuildRequires: rpmbuild(macros) >= 1.714 | |
20 | %if %{with python2} | |
d2f5553e | 21 | BuildRequires: python-modules >= 1:2.7 |
a93e6fa9 JB |
22 | BuildRequires: python-setuptools |
23 | %endif | |
24 | %if %{with python3} | |
d2f5553e | 25 | BuildRequires: python3-modules >= 1:3.4 |
a93e6fa9 JB |
26 | BuildRequires: python3-setuptools |
27 | %endif | |
d2f5553e | 28 | Requires: python-modules >= 1:2.7 |
a93e6fa9 JB |
29 | BuildArch: noarch |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | This package contains a single module, which implements a platform | |
34 | independent file lock in Python, which provides a simple way of | |
35 | inter-process communication. | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | Ten pakiet zawiera pojedynczny moduł implementujący niezależne od | |
39 | platformy blokady plikowe w Pythonie. Zapewniają one prosty sposób | |
40 | komunikacji międzyprocesowej. | |
41 | ||
42 | %package -n python3-filelock | |
43 | Summary: A platform independent file lock | |
44 | Summary(pl.UTF-8): Niezależne od platformy blokady plikowe | |
45 | Group: Libraries/Python | |
d2f5553e | 46 | Requires: python3-modules >= 1:3.4 |
a93e6fa9 JB |
47 | |
48 | %description -n python3-filelock | |
49 | This package contains a single module, which implements a platform | |
50 | independent file lock in Python, which provides a simple way of | |
51 | inter-process communication. | |
52 | ||
53 | %description -n python3-filelock -l pl.UTF-8 | |
54 | Ten pakiet zawiera pojedynczny moduł implementujący niezależne od | |
55 | platformy blokady plikowe w Pythonie. Zapewniają one prosty sposób | |
56 | komunikacji międzyprocesowej. | |
57 | ||
58 | %prep | |
59 | %setup -q -n filelock-%{version} | |
60 | ||
61 | %build | |
62 | %if %{with python2} | |
63 | %py_build | |
d2f5553e JB |
64 | |
65 | %if %{with tests} | |
66 | %{__python} test.py | |
67 | %endif | |
a93e6fa9 JB |
68 | %endif |
69 | ||
70 | %if %{with python3} | |
71 | %py3_build | |
d2f5553e JB |
72 | |
73 | %if %{with tests} | |
74 | %{__python3} test.py | |
75 | %endif | |
a93e6fa9 JB |
76 | %endif |
77 | ||
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | %if %{with python2} | |
82 | %py_install | |
83 | ||
84 | %py_postclean | |
85 | %endif | |
86 | ||
87 | %if %{with python3} | |
88 | %py3_install | |
89 | %endif | |
90 | ||
91 | %clean | |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
94 | %if %{with python2} | |
95 | %files | |
96 | %defattr(644,root,root,755) | |
d2f5553e | 97 | %doc LICENSE README.md |
a93e6fa9 JB |
98 | %{py_sitescriptdir}/filelock.py[co] |
99 | %{py_sitescriptdir}/filelock-%{version}-py*.egg-info | |
100 | %endif | |
101 | ||
102 | %if %{with python3} | |
103 | %files -n python3-filelock | |
104 | %defattr(644,root,root,755) | |
d2f5553e | 105 | %doc LICENSE README.md |
a93e6fa9 JB |
106 | %{py3_sitescriptdir}/filelock.py |
107 | %{py3_sitescriptdir}/__pycache__/filelock.cpython-*.py[co] | |
108 | %{py3_sitescriptdir}/filelock-%{version}-py*.egg-info | |
109 | %endif |