]> git.pld-linux.org Git - packages/flake8.git/blame - flake8.spec
- updated to 3.5.0
[packages/flake8.git] / flake8.spec
CommitLineData
a24e9a34
ER
1#
2# Conditional build:
37b9d23d
JB
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
34073edd
JB
5%bcond_without tests # pytest tests
6%bcond_without doc # Sphinx documentation
a24e9a34 7
d7cb1ebf
JB
8Summary: The modular source code checker: pycodestyle, pyflakes and co
9Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
abcf879e 10Name: flake8
34073edd
JB
11Version: 3.5.0
12Release: 1
abcf879e
AM
13License: MIT
14Group: Development/Tools
34073edd 15#Source0Download: https://pypi.org/simple/flake8/
d7cb1ebf 16Source0: https://files.pythonhosted.org/packages/source/f/flake8/%{name}-%{version}.tar.gz
34073edd 17# Source0-md5: 7e5fe39d578a2c2d0962b61b35b8c3fc
d7cb1ebf
JB
18Patch0: %{name}-mock.patch
19URL: https://gitlab.com/pycqa/flake8
37b9d23d 20BuildRequires: rpmbuild(macros) >= 1.714
abcf879e 21BuildRequires: rpm-pythonprov
37b9d23d 22%if %{with python2}
d7cb1ebf 23BuildRequires: python-modules >= 1:2.7
34073edd 24BuildRequires: python-setuptools >= 30
37b9d23d 25%if %{with tests}
9bc90c26 26BuildRequires: python-configparser
d7cb1ebf
JB
27BuildRequires: python-enum34
28BuildRequires: python-mccabe >= 0.6.0
29BuildRequires: python-mccabe < 0.7.0
972dfbb9 30BuildRequires: python-mock >= 2.0.0
53123676 31BuildRequires: python-pycodestyle >= 2.0.0
d7cb1ebf
JB
32BuildRequires: python-pycodestyle < 2.4.0
33BuildRequires: python-pyflakes >= 1.5.0
34073edd 34BuildRequires: python-pyflakes < 1.7.0
d7cb1ebf
JB
35BuildRequires: python-pytest
36BuildRequires: python-pytest-runner
37b9d23d
JB
37%endif
38%endif
39%if %{with python3}
d7cb1ebf 40BuildRequires: python3-modules >= 1:3.4
34073edd 41BuildRequires: python3-setuptools >= 30
a24e9a34 42%if %{with tests}
d7cb1ebf
JB
43BuildRequires: python3-mccabe >= 0.6.0
44BuildRequires: python3-mccabe < 0.7.0
53123676 45BuildRequires: python3-pycodestyle >= 2.0.0
d7cb1ebf
JB
46BuildRequires: python3-pycodestyle < 2.4.0
47BuildRequires: python3-pyflakes >= 1.5.0
34073edd 48BuildRequires: python3-pyflakes < 1.7.0
d7cb1ebf
JB
49BuildRequires: python3-pytest
50BuildRequires: python3-pytest-runner
51BuildRequires: sed >= 4.0
a24e9a34 52%endif
37b9d23d 53%endif
34073edd
JB
54%if %{with doc}
55BuildRequires: python3-sphinx-prompt
56BuildRequires: sphinx-pdg-3
57%endif
37b9d23d
JB
58%if %{with python3}
59Requires: python3-flake8 = %{version}-%{release}
60%else
61Requires: python-flake8 = %{version}-%{release}
62%endif
abcf879e
AM
63BuildArch: noarch
64BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66%description
67The modular source code checker. It is a wrapper around these tools:
68- PyFlakes
d7cb1ebf 69- pycodestyle
abcf879e
AM
70- Ned Batchelder's McCabe script
71
37b9d23d
JB
72%description -l pl.UTF-8
73Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
74dla narzędzi:
75- PyFlakes
d7cb1ebf 76- pycodestyle
37b9d23d
JB
77- skrypt McCabe autorstwa Neda Batcheldera
78
79%package -n python-flake8
d7cb1ebf
JB
80Summary: The modular source code checker: pycodestyle, pyflakes and co
81Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
37b9d23d 82Group: Libraries/Python
d7cb1ebf 83Requires: python-modules >= 1:2.7
37b9d23d
JB
84
85%description -n python-flake8
86The modular source code checker. It is a wrapper around these tools:
87- PyFlakes
d7cb1ebf 88- pycodestyle
37b9d23d
JB
89- Ned Batchelder's McCabe script
90
91%description -n python-flake8 -l pl.UTF-8
92Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
93dla narzędzi:
94- PyFlakes
d7cb1ebf 95- pycodestyle
37b9d23d
JB
96- skrypt McCabe autorstwa Neda Batcheldera
97
98%package -n python3-flake8
d7cb1ebf
JB
99Summary: The modular source code checker: pycodestyle, pyflakes and co
100Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
37b9d23d 101Group: Libraries/Python
d7cb1ebf 102Requires: python3-modules >= 1:3.4
37b9d23d
JB
103
104%description -n python3-flake8
105The modular source code checker. It is a wrapper around these tools:
106- PyFlakes
d7cb1ebf 107- pycodestyle
37b9d23d
JB
108- Ned Batchelder's McCabe script
109
110%description -n python3-flake8 -l pl.UTF-8
111Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
112dla narzędzi:
113- PyFlakes
d7cb1ebf 114- pycodestyle
37b9d23d
JB
115- skrypt McCabe autorstwa Neda Batcheldera
116
34073edd
JB
117%package -n python-flake8-apidocs
118Summary: API documentation for Python flake8 module
119Summary(pl.UTF-8): Dokumentacja API modułu Pythona flake8
120Group: Documentation
121
122%description -n python-flake8-apidocs
123API documentation for Python flake8 module.
124
125%description -n python-flake8-apidocs -l pl.UTF-8
126Dokumentacja API modułu Pythona flake8.
127
abcf879e
AM
128%prep
129%setup -q
d7cb1ebf 130%patch0 -p1
abcf879e
AM
131
132%build
37b9d23d
JB
133%if %{with python2}
134%py_build %{?with_tests:test}
135%endif
136
137%if %{with python3}
d7cb1ebf
JB
138# don't require standalone mock
139%{__sed} -i -e 's/import mock/from unittest import mock/' $(grep 'import mock' tests/ -rl)
140
33643bb9 141%py3_build %{?with_tests:test}
37b9d23d 142%endif
abcf879e 143
34073edd
JB
144%if %{with doc}
145cd docs/source
146PYTHONPATH=$(pwd)/../../src \
147sphinx-build-3 -b html . _build/html
148%endif
149
abcf879e
AM
150%install
151rm -rf $RPM_BUILD_ROOT
37b9d23d
JB
152
153%if %{with python2}
154%py_install
d7cb1ebf 155%{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-2}
37b9d23d
JB
156%py_postclean
157%endif
158
159%if %{with python3}
33643bb9 160%py3_install
d7cb1ebf 161%{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-3}
34073edd
JB
162
163# avoid dependencies on python3egg(configparser), python3egg(enum34)
164%{__sed} -i -e "/^\[:python_version *< *'3\.2']/,/^$/ d" \
165 -e "/^\[:python_version *< *'3\.4']/,/^$/ d" \
166 $RPM_BUILD_ROOT%{py3_sitescriptdir}/flake8-%{version}-py*.egg-info/requires.txt
37b9d23d 167%endif
abcf879e 168
8b0b6706
ER
169ln -s flake-%{!?with_python3:2}%{?with_python3:3} $RPM_BUILD_ROOT%{_bindir}/flake8
170
abcf879e
AM
171%clean
172rm -rf $RPM_BUILD_ROOT
173
174%files
175%defattr(644,root,root,755)
abcf879e 176%attr(755,root,root) %{_bindir}/flake8
37b9d23d
JB
177
178%if %{with python2}
179%files -n python-flake8
180%defattr(644,root,root,755)
34073edd 181%doc CONTRIBUTORS.txt LICENSE README.rst
37b9d23d
JB
182%attr(755,root,root) %{_bindir}/flake8-2
183%{py_sitescriptdir}/flake8
184%{py_sitescriptdir}/flake8-%{version}-py*.egg-info
185%endif
186
187%if %{with python3}
188%files -n python3-flake8
189%defattr(644,root,root,755)
34073edd 190%doc CONTRIBUTORS.txt LICENSE README.rst
37b9d23d
JB
191%attr(755,root,root) %{_bindir}/flake8-3
192%{py3_sitescriptdir}/flake8
193%{py3_sitescriptdir}/flake8-%{version}-py*.egg-info
194%endif
34073edd
JB
195
196%if %{with doc}
197%files -n python-flake8-apidocs
198%defattr(644,root,root,755)
199%doc docs/source/_build/html/{_modules,_static,internal,plugin-development,release-notes,user,*.html,*.js}
200%endif
This page took 0.127077 seconds and 4 git commands to generate.