]>
Commit | Line | Data |
---|---|---|
c19795d4 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | Summary: LiveReload - tool for web developers | |
7 | Summary(pl.UTF-8): LiveReload - narzędzie dla programistów WWW | |
8 | Name: python-livereload | |
6cb6a7ff JB |
9 | Version: 2.6.1 |
10 | Release: 1 | |
c19795d4 JB |
11 | License: BSD |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/livereload/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/l/livereload/livereload-%{version}.tar.gz | |
6cb6a7ff | 15 | # Source0-md5: 7d155b74421b96a265f291404368d0da |
c19795d4 JB |
16 | URL: https://github.com/lepture/python-livereload |
17 | %if %{with python2} | |
18 | BuildRequires: python-modules >= 1:2.7 | |
19 | BuildRequires: python-setuptools | |
20 | %endif | |
21 | %if %{with python3} | |
22 | BuildRequires: python3-modules >= 1:3.5 | |
23 | BuildRequires: python3-setuptools | |
24 | %endif | |
25 | BuildRequires: rpm-pythonprov | |
26 | BuildRequires: rpmbuild(macros) >= 1.714 | |
27 | Requires: python-modules >= 1:2.7 | |
28 | BuildArch: noarch | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | Python LiveReload is an awesome tool for web developers. | |
33 | ||
34 | %description -l pl.UTF-8 | |
35 | Python LiveReload jest niesamowitym narzędziem dla programistów WWW. | |
36 | ||
37 | %package -n python3-livereload | |
38 | Summary: LiveReload - tool for web developers | |
39 | Summary(pl.UTF-8): LiveReload - narzędzie dla programistów WWW | |
40 | Group: Libraries/Python | |
41 | Requires: python3-modules >= 1:3.5 | |
42 | ||
43 | %description -n python3-livereload | |
44 | Python LiveReload is an awesome tool for web developers. | |
45 | ||
46 | %description -n python3-livereload -l pl.UTF-8 | |
47 | Python LiveReload jest niesamowitym narzędziem dla programistów WWW. | |
48 | ||
49 | %prep | |
50 | %setup -q -n livereload-%{version} | |
51 | ||
52 | %build | |
53 | %if %{with python2} | |
54 | %py_build | |
55 | %endif | |
56 | ||
57 | %if %{with python3} | |
58 | %py3_build | |
59 | %endif | |
60 | ||
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
c19795d4 JB |
64 | %if %{with python2} |
65 | %py_install | |
66 | ||
67 | %py_postclean | |
6cb6a7ff JB |
68 | |
69 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/livereload{,-2} | |
70 | %endif | |
71 | ||
72 | %if %{with python3} | |
73 | %py3_install | |
74 | ||
75 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/livereload{,-3} | |
76 | ln -s livereload-3 $RPM_BUILD_ROOT%{_bindir}/livereload | |
c19795d4 JB |
77 | %endif |
78 | ||
79 | %clean | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
82 | %if %{with python2} | |
83 | %files | |
84 | %defattr(644,root,root,755) | |
85 | %doc LICENSE README.rst | |
6cb6a7ff | 86 | %attr(755,root,root) %{_bindir}/livereload-2 |
c19795d4 JB |
87 | %{py_sitescriptdir}/livereload |
88 | %{py_sitescriptdir}/livereload-%{version}-py*.egg-info | |
89 | %endif | |
90 | ||
91 | %if %{with python3} | |
92 | %files -n python3-livereload | |
93 | %defattr(644,root,root,755) | |
94 | %doc LICENSE README.rst | |
6cb6a7ff | 95 | %attr(755,root,root) %{_bindir}/livereload |
c19795d4 JB |
96 | %attr(755,root,root) %{_bindir}/livereload-3 |
97 | %{py3_sitescriptdir}/livereload | |
98 | %{py3_sitescriptdir}/livereload-%{version}-py*.egg-info | |
99 | %endif |