]> git.pld-linux.org Git - packages/python-pyflakes.git/blame - python-pyflakes.spec
rebuild with tests and docs
[packages/python-pyflakes.git] / python-pyflakes.spec
CommitLineData
a4ae4119
ER
1#
2# Conditional build:
a329ee82 3%bcond_without tests # test target
9fd6c09f
AM
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
a4ae4119 6
20c0205c 7%define module pyflakes
62420600 8Summary: Passive checker of Python programs
dddde51f 9Summary(pl.UTF-8): Pasywny program do sprawdzania programów w Pythonie
20c0205c 10Name: python-%{module}
57d8659d
JB
11# NOTE: before upgrading to >=2.4.0 check for python2-compatible flake8 release supporting new pyflakes
12Version: 2.3.1
2f66c8cb 13Release: 3
62420600
KK
14License: MIT
15Group: Development/Tools
ac0f5d69 16#Source0Download: https://pypi.org/simple/pyflakes/
7f9fdb9b 17Source0: https://files.pythonhosted.org/packages/source/p/pyflakes/%{module}-%{version}.tar.gz
57d8659d 18# Source0-md5: 0b60a307a6b293ee505fe0134e9d46e9
7f9fdb9b 19URL: https://github.com/PyCQA/pyflakes
9fd6c09f 20%if %{with python2}
bd02111e
JB
21BuildRequires: python-devel >= 1:2.7
22BuildRequires: python-modules >= 1:2.7
7f9fdb9b 23BuildRequires: python-setuptools
9fd6c09f 24%endif
9fd6c09f 25%if %{with python3}
bd02111e
JB
26BuildRequires: python3-devel >= 1:3.4
27BuildRequires: python3-modules >= 1:3.4
7f9fdb9b 28BuildRequires: python3-setuptools
9fd6c09f 29%endif
a329ee82
JB
30BuildRequires: rpm-pythonprov
31BuildRequires: rpmbuild(macros) >= 1.714
bd02111e 32Requires: python-modules >= 1:2.7
20c0205c
ER
33Provides: pyflakes = %{version}-%{release}
34Obsoletes: pyflakes < 0.4.0-2
62420600
KK
35BuildArch: noarch
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39Pyflakes is a simple program which checks Python source files for
40errors. It is similar to PyChecker in scope, but differs in that it
41does not execute the modules to check them. This is both safer and
42faster, although it does not perform as many checks. Unlike PyLint,
43Pyflakes checks only for logical errors in programs; it does not
44perform any checks on style.
45
d3ebe99a
JR
46%description -l pl.UTF-8
47Pyflakes to prosty program sprawdzający pliki źródłowe Pythona pod
48kątem błędów. Jest podobny do PyCheckera jeśli chodzi o zakres
49działania, ale różni się tym, że nie wykonuje modułów przy sprawdzaniu
50ich. Jest to zarówno bardziej bezpieczne, jak i szybze, choć nie
20c0205c
ER
51sprawdza tak wielu rzeczy. W przeciwieństwie do PyLinta Pyflakes szuka
52tylko błędów logicznych w programach; nie sprawdza stylu.
01fa6f59 53
9fd6c09f
AM
54%package -n python3-%{module}
55Summary: Passive checker of Python programs
56Summary(pl.UTF-8): Pasywny program do sprawdzania programów w Pythonie
57Group: Libraries/Python
bd02111e 58Requires: python3-modules >= 1:3.4
bf9467f2
JB
59# default binary moved
60Conflicts: python-pyflakes < 2.1.1-4
9fd6c09f
AM
61
62%description -n python3-%{module}
63Pyflakes is a simple program which checks Python source files for
64errors. It is similar to PyChecker in scope, but differs in that it
65does not execute the modules to check them. This is both safer and
66faster, although it does not perform as many checks. Unlike PyLint,
67Pyflakes checks only for logical errors in programs; it does not
68perform any checks on style.
69
70%description -n python3-%{module} -l pl.UTF-8
71Pyflakes to prosty program sprawdzający pliki źródłowe Pythona pod
72kątem błędów. Jest podobny do PyCheckera jeśli chodzi o zakres
73działania, ale różni się tym, że nie wykonuje modułów przy sprawdzaniu
74ich. Jest to zarówno bardziej bezpieczne, jak i szybze, choć nie
75sprawdza tak wielu rzeczy. W przeciwieństwie do PyLinta Pyflakes szuka
76tylko błędów logicznych w programach; nie sprawdza stylu.
77
62420600 78%prep
20c0205c 79%setup -q -n %{module}-%{version}
62420600 80
a4ae4119 81%build
9fd6c09f 82%if %{with python2}
bf9467f2
JB
83%py_build
84
1c918c74 85%if %{with tests}
bf9467f2 86%{__python} -m unittest discover -s pyflakes/test
9fd6c09f 87%endif
1c918c74 88%endif
a4ae4119 89
9fd6c09f 90%if %{with python3}
bf9467f2
JB
91%py3_build
92
1c918c74 93%if %{with tests}
bf9467f2 94%{__python3} -m unittest discover -s pyflakes/test
a4ae4119 95%endif
1c918c74 96%endif
a4ae4119 97
62420600
KK
98%install
99rm -rf $RPM_BUILD_ROOT
9fd6c09f
AM
100
101%if %{with python2}
6cfbf5ca 102%py_install
62420600 103
a329ee82 104%{__mv} $RPM_BUILD_ROOT%{_bindir}/pyflakes{,-2}
bf9467f2 105
a329ee82 106%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/pyflakes/test
62420600 107%py_postclean
9fd6c09f
AM
108%endif
109
110%if %{with python3}
6cfbf5ca 111%py3_install
a329ee82
JB
112
113%{__mv} $RPM_BUILD_ROOT%{_bindir}/pyflakes{,-3}
bf9467f2 114ln -sf pyflakes-3 $RPM_BUILD_ROOT%{_bindir}/pyflakes
62420600 115
bf9467f2 116%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/pyflakes/test
a329ee82 117%endif
20c0205c 118
62420600
KK
119%clean
120rm -rf $RPM_BUILD_ROOT
121
9fd6c09f 122%if %{with python2}
62420600
KK
123%files
124%defattr(644,root,root,755)
bd02111e 125%doc AUTHORS LICENSE NEWS.rst README.rst
a329ee82 126%attr(755,root,root) %{_bindir}/pyflakes-2
62420600 127%{py_sitescriptdir}/pyflakes
7f9fdb9b 128%{py_sitescriptdir}/pyflakes-%{version}-py*.egg-info
20c0205c 129%endif
9fd6c09f
AM
130
131%if %{with python3}
132%files -n python3-%{module}
133%defattr(644,root,root,755)
bd02111e 134%doc AUTHORS LICENSE NEWS.rst README.rst
bf9467f2 135%attr(755,root,root) %{_bindir}/pyflakes
a329ee82
JB
136%attr(755,root,root) %{_bindir}/pyflakes-3
137%{py3_sitescriptdir}/pyflakes
138%{py3_sitescriptdir}/pyflakes-%{version}-py*.egg-info
9fd6c09f 139%endif
This page took 0.228521 seconds and 5 git commands to generate.