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