]> git.pld-linux.org Git - packages/python3-filelock.git/blame - python-filelock.spec
use use pytest for running tests
[packages/python3-filelock.git] / python-filelock.spec
CommitLineData
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
7Summary: A platform independent file lock
8Summary(pl.UTF-8): Niezależne od platformy blokady plikowe
9Name: python-filelock
4e2d35e3
JP
10Version: 3.2.1
11Release: 1
d2f5553e 12License: Public Domain
a93e6fa9
JB
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/filelock/
15Source0: https://files.pythonhosted.org/packages/source/f/filelock/filelock-%{version}.tar.gz
4e2d35e3 16# Source0-md5: 92fea9fb4ebf39d746c77ec6c4c87be0
a93e6fa9
JB
17URL: https://pypi.org/project/filelock/
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.714
20%if %{with python2}
d2f5553e 21BuildRequires: python-modules >= 1:2.7
a93e6fa9 22BuildRequires: python-setuptools
3be7e3a5
JP
23%if %{with tests}
24BuildRequires: python-pytest
25%endif
a93e6fa9
JB
26%endif
27%if %{with python3}
d2f5553e 28BuildRequires: python3-modules >= 1:3.4
a93e6fa9 29BuildRequires: python3-setuptools
3be7e3a5
JP
30%if %{with tests}
31BuildRequires: python3-pytest
32%endif
a93e6fa9 33%endif
d2f5553e 34Requires: python-modules >= 1:2.7
a93e6fa9
JB
35BuildArch: noarch
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39This package contains a single module, which implements a platform
40independent file lock in Python, which provides a simple way of
41inter-process communication.
42
43%description -l pl.UTF-8
44Ten pakiet zawiera pojedynczny moduł implementujący niezależne od
45platformy blokady plikowe w Pythonie. Zapewniają one prosty sposób
46komunikacji międzyprocesowej.
47
48%package -n python3-filelock
49Summary: A platform independent file lock
50Summary(pl.UTF-8): Niezależne od platformy blokady plikowe
51Group: Libraries/Python
d2f5553e 52Requires: python3-modules >= 1:3.4
a93e6fa9
JB
53
54%description -n python3-filelock
55This package contains a single module, which implements a platform
56independent file lock in Python, which provides a simple way of
57inter-process communication.
58
59%description -n python3-filelock -l pl.UTF-8
60Ten pakiet zawiera pojedynczny moduł implementujący niezależne od
61platformy blokady plikowe w Pythonie. Zapewniają one prosty sposób
62komunikacji międzyprocesowej.
63
64%prep
65%setup -q -n filelock-%{version}
66
67%build
68%if %{with python2}
69%py_build
d2f5553e
JB
70
71%if %{with tests}
3be7e3a5
JP
72PYTHONPATH=$(pwd)/src \
73%{__python} -m pytest tests
d2f5553e 74%endif
a93e6fa9
JB
75%endif
76
77%if %{with python3}
78%py3_build
d2f5553e
JB
79
80%if %{with tests}
3be7e3a5
JP
81PYTHONPATH=$(pwd)/src \
82%{__python3} -m pytest tests
d2f5553e 83%endif
a93e6fa9
JB
84%endif
85
86%install
87rm -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
100rm -rf $RPM_BUILD_ROOT
101
102%if %{with python2}
103%files
104%defattr(644,root,root,755)
d2f5553e 105%doc LICENSE README.md
4e2d35e3 106%{py_sitescriptdir}/filelock
a93e6fa9
JB
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)
d2f5553e 113%doc LICENSE README.md
4e2d35e3 114%{py3_sitescriptdir}/filelock
a93e6fa9
JB
115%{py3_sitescriptdir}/filelock-%{version}-py*.egg-info
116%endif
This page took 0.075783 seconds and 4 git commands to generate.