]> git.pld-linux.org Git - packages/flake8.git/blob - flake8.spec
1531926eef6634d645c8a1e758b10e7039824ff4
[packages/flake8.git] / flake8.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_without  tests   # do not perform "make test"
6
7 Summary:        The modular source code checker: pep8, pyflakes and co
8 Summary(pl.UTF-8):      Modularne narzędzie do sprawdzania kodu źródłowego: pep8, pyflakes itp.
9 Name:           flake8
10 Version:        2.5.4
11 Release:        2
12 License:        MIT
13 Group:          Development/Tools
14 #Source0Download: https://pypi.python.org/simple/flake8/
15 Source0:        https://pypi.python.org/packages/source/f/flake8/%{name}-%{version}.tar.gz
16 # Source0-md5:  a4585b3569b95c3f66acb8294a7f06ef
17 Patch0:         %{name}-dependencies.patch
18 URL:            https://pypi.python.org/pypi/flake8
19 BuildRequires:  rpmbuild(macros) >= 1.714
20 BuildRequires:  rpm-pythonprov
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.5
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-mccabe >= 0.2.1
26 BuildRequires:  python-mock
27 BuildRequires:  python-nose
28 BuildRequires:  python-pep8 >= 1.5.7
29 BuildRequires:  python-pyflakes >= 0.8.1
30 %endif
31 %endif
32 %if %{with python3}
33 BuildRequires:  python3-modules >= 1:3.2
34 BuildRequires:  python3-setuptools
35 %if %{with tests}
36 BuildRequires:  python3-mccabe >= 0.2.1
37 BuildRequires:  python3-nose
38 BuildRequires:  python3-pep8 >= 1.5.7
39 BuildRequires:  python3-pyflakes >= 0.8.1
40 %endif
41 %endif
42 %if %{with python3}
43 Requires:       python3-flake8 = %{version}-%{release}
44 %else
45 Requires:       python-flake8 = %{version}-%{release}
46 %endif
47 BuildArch:      noarch
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
51 The modular source code checker. It is a wrapper around these tools:
52 - PyFlakes
53 - pep8
54 - Ned Batchelder's McCabe script
55
56 %description -l pl.UTF-8
57 Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
58 dla narzędzi:
59 - PyFlakes
60 - pep8
61 - skrypt McCabe autorstwa Neda Batcheldera
62
63 %package -n python-flake8
64 Summary:        The modular source code checker: pep8, pyflakes and co
65 Summary(pl.UTF-8):      Modularne narzędzie do sprawdzania kodu źródłowego: pep8, pyflakes itp.
66 Group:          Libraries/Python
67 Requires:       python-modules
68
69 %description -n python-flake8
70 The modular source code checker. It is a wrapper around these tools:
71 - PyFlakes
72 - pep8
73 - Ned Batchelder's McCabe script
74
75 %description -n python-flake8 -l pl.UTF-8
76 Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
77 dla narzędzi:
78 - PyFlakes
79 - pep8
80 - skrypt McCabe autorstwa Neda Batcheldera
81
82 %package -n python3-flake8
83 Summary:        The modular source code checker: pep8, pyflakes and co
84 Summary(pl.UTF-8):      Modularne narzędzie do sprawdzania kodu źródłowego: pep8, pyflakes itp.
85 Group:          Libraries/Python
86 Requires:       python3-modules
87
88 %description -n python3-flake8
89 The modular source code checker. It is a wrapper around these tools:
90 - PyFlakes
91 - pep8
92 - Ned Batchelder's McCabe script
93
94 %description -n python3-flake8 -l pl.UTF-8
95 Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
96 dla narzędzi:
97 - PyFlakes
98 - pep8
99 - skrypt McCabe autorstwa Neda Batcheldera
100
101 %prep
102 %setup -q
103 %patch0 -p1
104
105 %build
106 %if %{with python2}
107 %py_build %{?with_tests:test}
108 %endif
109
110 %if %{with python3}
111 %py3_build %{?with_tests:test}
112 %endif
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116
117 %if %{with python2}
118 %py_install
119 mv $RPM_BUILD_ROOT%{_bindir}/flake8{,-2}
120 %py_postclean
121 %endif
122
123 %if %{with python3}
124 %py3_install
125 mv $RPM_BUILD_ROOT%{_bindir}/flake8{,-3}
126 %endif
127
128 ln -s flake-%{!?with_python3:2}%{?with_python3:3} $RPM_BUILD_ROOT%{_bindir}/flake8
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %files
134 %defattr(644,root,root,755)
135 %doc CHANGES.rst CONTRIBUTORS.txt LICENSE README.rst
136 %attr(755,root,root) %{_bindir}/flake8
137
138 %if %{with python2}
139 %files -n python-flake8
140 %defattr(644,root,root,755)
141 %attr(755,root,root) %{_bindir}/flake8-2
142 %{py_sitescriptdir}/flake8
143 %{py_sitescriptdir}/flake8-%{version}-py*.egg-info
144 %endif
145
146 %if %{with python3}
147 %files -n python3-flake8
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_bindir}/flake8-3
150 %{py3_sitescriptdir}/flake8
151 %{py3_sitescriptdir}/flake8-%{version}-py*.egg-info
152 %endif
This page took 0.083485 seconds and 2 git commands to generate.