]>
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 | |
0fb81e90 | 9 | Version: 2.6.3 |
40efd566 | 10 | Release: 3 |
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 | |
0fb81e90 | 15 | # Source0-md5: 4b68646bf76c7be88f584dfe04288a91 |
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 | |
fadc4959 | 42 | Conflicts: python-livereload < 2.6.1 |
c19795d4 JB |
43 | |
44 | %description -n python3-livereload | |
45 | Python LiveReload is an awesome tool for web developers. | |
46 | ||
47 | %description -n python3-livereload -l pl.UTF-8 | |
48 | Python LiveReload jest niesamowitym narzędziem dla programistów WWW. | |
49 | ||
50 | %prep | |
51 | %setup -q -n livereload-%{version} | |
52 | ||
53 | %build | |
54 | %if %{with python2} | |
55 | %py_build | |
56 | %endif | |
57 | ||
58 | %if %{with python3} | |
59 | %py3_build | |
60 | %endif | |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
c19795d4 JB |
65 | %if %{with python2} |
66 | %py_install | |
67 | ||
68 | %py_postclean | |
6cb6a7ff JB |
69 | |
70 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/livereload{,-2} | |
71 | %endif | |
72 | ||
73 | %if %{with python3} | |
74 | %py3_install | |
75 | ||
76 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/livereload{,-3} | |
77 | ln -s livereload-3 $RPM_BUILD_ROOT%{_bindir}/livereload | |
c19795d4 JB |
78 | %endif |
79 | ||
80 | %clean | |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | ||
83 | %if %{with python2} | |
84 | %files | |
85 | %defattr(644,root,root,755) | |
86 | %doc LICENSE README.rst | |
6cb6a7ff | 87 | %attr(755,root,root) %{_bindir}/livereload-2 |
c19795d4 JB |
88 | %{py_sitescriptdir}/livereload |
89 | %{py_sitescriptdir}/livereload-%{version}-py*.egg-info | |
90 | %endif | |
91 | ||
92 | %if %{with python3} | |
93 | %files -n python3-livereload | |
94 | %defattr(644,root,root,755) | |
95 | %doc LICENSE README.rst | |
6cb6a7ff | 96 | %attr(755,root,root) %{_bindir}/livereload |
c19795d4 JB |
97 | %attr(755,root,root) %{_bindir}/livereload-3 |
98 | %{py3_sitescriptdir}/livereload | |
99 | %{py3_sitescriptdir}/livereload-%{version}-py*.egg-info | |
100 | %endif |