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