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