]>
Commit | Line | Data |
---|---|---|
a4ae4119 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | ||
20c0205c | 5 | %define module pyflakes |
62420600 | 6 | Summary: Passive checker of Python programs |
dddde51f | 7 | Summary(pl.UTF-8): Pasywny program do sprawdzania programów w Pythonie |
20c0205c | 8 | Name: python-%{module} |
84f80587 | 9 | Version: 0.8.1 |
e2c1b84e | 10 | Release: 1 |
62420600 KK |
11 | License: MIT |
12 | Group: Development/Tools | |
20c0205c | 13 | Source0: http://pypi.python.org/packages/source/p/pyflakes/%{module}-%{version}.tar.gz |
84f80587 | 14 | # Source0-md5: 905fe91ad14b912807e8fdc2ac2e2c23 |
62420600 | 15 | URL: http://www.divmod.org/projects/pyflakes |
a4ae4119 | 16 | BuildRequires: python-TwistedCore |
62420600 | 17 | BuildRequires: python-devel |
a4ae4119 | 18 | %{?with_tests:BuildRequires: rpm-pythonprov} |
62420600 KK |
19 | BuildRequires: rpmbuild(macros) >= 1.219 |
20 | %pyrequires_eq python-modules | |
20c0205c ER |
21 | Provides: pyflakes = %{version}-%{release} |
22 | Obsoletes: pyflakes < 0.4.0-2 | |
62420600 KK |
23 | BuildArch: noarch |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | Pyflakes is a simple program which checks Python source files for | |
28 | errors. It is similar to PyChecker in scope, but differs in that it | |
29 | does not execute the modules to check them. This is both safer and | |
30 | faster, although it does not perform as many checks. Unlike PyLint, | |
31 | Pyflakes checks only for logical errors in programs; it does not | |
32 | perform any checks on style. | |
33 | ||
d3ebe99a JR |
34 | %description -l pl.UTF-8 |
35 | Pyflakes to prosty program sprawdzający pliki źródłowe Pythona pod | |
36 | kątem błędów. Jest podobny do PyCheckera jeśli chodzi o zakres | |
37 | działania, ale różni się tym, że nie wykonuje modułów przy sprawdzaniu | |
38 | ich. Jest to zarówno bardziej bezpieczne, jak i szybze, choć nie | |
20c0205c ER |
39 | sprawdza tak wielu rzeczy. W przeciwieństwie do PyLinta Pyflakes szuka |
40 | tylko błędów logicznych w programach; nie sprawdza stylu. | |
01fa6f59 | 41 | |
62420600 | 42 | %prep |
20c0205c | 43 | %setup -q -n %{module}-%{version} |
62420600 | 44 | |
a4ae4119 ER |
45 | %build |
46 | %{__python} setup.py build | |
47 | ||
48 | %if %{with tests} | |
49 | trial pyflakes/test | |
50 | %endif | |
51 | ||
62420600 KK |
52 | %install |
53 | rm -rf $RPM_BUILD_ROOT | |
20c0205c | 54 | %{__python} setup.py install \ |
62420600 KK |
55 | --optimize=2 \ |
56 | --root=$RPM_BUILD_ROOT | |
57 | ||
58 | %py_postclean | |
59 | ||
20c0205c ER |
60 | rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/pyflakes/test |
61 | ||
62420600 KK |
62 | %clean |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
20c0205c | 67 | %attr(755,root,root) %{_bindir}/pyflakes |
62420600 | 68 | %{py_sitescriptdir}/pyflakes |
20c0205c ER |
69 | %if "%{py_ver}" > "2.4" |
70 | %{py_sitescriptdir}/pyflakes-%{version}-*.egg-info | |
71 | %endif |