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