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