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