]>
Commit | Line | Data |
---|---|---|
a24e9a34 ER |
1 | # |
2 | # Conditional build: | |
37b9d23d JB |
3 | %bcond_without python2 # CPython 2.x module |
4 | %bcond_without python3 # CPython 3.x module | |
a24e9a34 ER |
5 | %bcond_without tests # do not perform "make test" |
6 | ||
abcf879e | 7 | Summary: The modular source code checker: pep8, pyflakes and co |
37b9d23d | 8 | Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pep8, pyflakes itp. |
abcf879e | 9 | Name: flake8 |
37b9d23d JB |
10 | Version: 2.5.4 |
11 | Release: 1 | |
abcf879e AM |
12 | License: MIT |
13 | Group: Development/Tools | |
37b9d23d | 14 | #Source0Download: https://pypi.python.org/simple/flake8/ |
abcf879e | 15 | Source0: https://pypi.python.org/packages/source/f/flake8/%{name}-%{version}.tar.gz |
37b9d23d | 16 | # Source0-md5: a4585b3569b95c3f66acb8294a7f06ef |
abcf879e | 17 | URL: https://pypi.python.org/pypi/flake8 |
37b9d23d | 18 | BuildRequires: rpmbuild(macros) >= 1.714 |
abcf879e | 19 | BuildRequires: rpm-pythonprov |
37b9d23d JB |
20 | %if %{with python2} |
21 | BuildRequires: python-modules >= 1:2.5 | |
22 | BuildRequires: python-setuptools | |
23 | %if %{with tests} | |
24 | BuildRequires: python-mccabe >= 0.2.1 | |
25 | BuildRequires: python-mock | |
26 | BuildRequires: python-nose | |
27 | BuildRequires: python-pep8 >= 1.5.7 | |
28 | BuildRequires: python-pyflakes >= 0.8.1 | |
29 | %endif | |
30 | %endif | |
31 | %if %{with python3} | |
32 | BuildRequires: python3-modules >= 1:3.2 | |
33 | BuildRequires: python3-setuptools | |
a24e9a34 ER |
34 | %if %{with tests} |
35 | BuildRequires: python3-mccabe >= 0.2.1 | |
15a03bbe | 36 | BuildRequires: python3-nose |
a24e9a34 ER |
37 | BuildRequires: python3-pep8 >= 1.5.7 |
38 | BuildRequires: python3-pyflakes >= 0.8.1 | |
39 | %endif | |
37b9d23d JB |
40 | %endif |
41 | %if %{with python3} | |
42 | Requires: python3-flake8 = %{version}-%{release} | |
43 | %else | |
44 | Requires: python-flake8 = %{version}-%{release} | |
45 | %endif | |
abcf879e AM |
46 | BuildArch: noarch |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
48 | ||
49 | %description | |
50 | The modular source code checker. It is a wrapper around these tools: | |
51 | - PyFlakes | |
52 | - pep8 | |
53 | - Ned Batchelder's McCabe script | |
54 | ||
37b9d23d JB |
55 | %description -l pl.UTF-8 |
56 | Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie | |
57 | dla narzędzi: | |
58 | - PyFlakes | |
59 | - pep8 | |
60 | - skrypt McCabe autorstwa Neda Batcheldera | |
61 | ||
62 | %package -n python-flake8 | |
63 | Summary: The modular source code checker: pep8, pyflakes and co | |
64 | Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pep8, pyflakes itp. | |
65 | Group: Libraries/Python | |
66 | Requires: python-modules | |
67 | ||
68 | %description -n python-flake8 | |
69 | The modular source code checker. It is a wrapper around these tools: | |
70 | - PyFlakes | |
71 | - pep8 | |
72 | - Ned Batchelder's McCabe script | |
73 | ||
74 | %description -n python-flake8 -l pl.UTF-8 | |
75 | Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie | |
76 | dla narzędzi: | |
77 | - PyFlakes | |
78 | - pep8 | |
79 | - skrypt McCabe autorstwa Neda Batcheldera | |
80 | ||
81 | %package -n python3-flake8 | |
82 | Summary: The modular source code checker: pep8, pyflakes and co | |
83 | Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pep8, pyflakes itp. | |
84 | Group: Libraries/Python | |
85 | Requires: python3-modules | |
86 | ||
87 | %description -n python3-flake8 | |
88 | The modular source code checker. It is a wrapper around these tools: | |
89 | - PyFlakes | |
90 | - pep8 | |
91 | - Ned Batchelder's McCabe script | |
92 | ||
93 | %description -n python3-flake8 -l pl.UTF-8 | |
94 | Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie | |
95 | dla narzędzi: | |
96 | - PyFlakes | |
97 | - pep8 | |
98 | - skrypt McCabe autorstwa Neda Batcheldera | |
99 | ||
abcf879e AM |
100 | %prep |
101 | %setup -q | |
102 | ||
103 | %build | |
37b9d23d JB |
104 | %if %{with python2} |
105 | %py_build %{?with_tests:test} | |
106 | %endif | |
107 | ||
108 | %if %{with python3} | |
33643bb9 | 109 | %py3_build %{?with_tests:test} |
37b9d23d | 110 | %endif |
abcf879e AM |
111 | |
112 | %install | |
113 | rm -rf $RPM_BUILD_ROOT | |
37b9d23d JB |
114 | |
115 | %if %{with python2} | |
116 | %py_install | |
117 | cp -p $RPM_BUILD_ROOT%{_bindir}/flake8{,-2} | |
118 | %py_postclean | |
119 | %endif | |
120 | ||
121 | %if %{with python3} | |
33643bb9 | 122 | %py3_install |
37b9d23d JB |
123 | cp -p $RPM_BUILD_ROOT%{_bindir}/flake8{,-3} |
124 | %endif | |
abcf879e AM |
125 | |
126 | %clean | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | ||
129 | %files | |
130 | %defattr(644,root,root,755) | |
37b9d23d | 131 | %doc CHANGES.rst CONTRIBUTORS.txt LICENSE README.rst |
abcf879e | 132 | %attr(755,root,root) %{_bindir}/flake8 |
37b9d23d JB |
133 | |
134 | %if %{with python2} | |
135 | %files -n python-flake8 | |
136 | %defattr(644,root,root,755) | |
137 | %attr(755,root,root) %{_bindir}/flake8-2 | |
138 | %{py_sitescriptdir}/flake8 | |
139 | %{py_sitescriptdir}/flake8-%{version}-py*.egg-info | |
140 | %endif | |
141 | ||
142 | %if %{with python3} | |
143 | %files -n python3-flake8 | |
144 | %defattr(644,root,root,755) | |
145 | %attr(755,root,root) %{_bindir}/flake8-3 | |
146 | %{py3_sitescriptdir}/flake8 | |
147 | %{py3_sitescriptdir}/flake8-%{version}-py*.egg-info | |
148 | %endif |