]> git.pld-linux.org Git - packages/python-pylint.git/blob - pylint.spec
- reverted to 1.x for python 2
[packages/python-pylint.git] / pylint.spec
1 # TODO:
2 # - include examples in package
3
4 # Conditional build:
5 %bcond_without  python2 # Python 2.x version
6 %bcond_without  python3 # Python 3.x version (available as 'py3lint')
7
8 Summary:        Python 2 tool that checks if a module satisfy a coding standard
9 Summary(pl.UTF-8):      Narzędzie Pythona 2 sprawdzające zgodność modułu ze standardem kodowania
10 Name:           pylint
11 Version:        1.8.2
12 Release:        2
13 License:        GPL v2+
14 Group:          Development/Languages/Python
15 #Source0Download: https://pypi.python.org/pypi/pylint
16 Source0:        https://github.com/PyCQA/pylint/archive/%{name}-%{version}.tar.gz
17 # Source0-md5:  573874b242a49af0682c29badc5cf1b9
18 URL:            http://www.pylint.org/
19 %if %{with python2}
20 BuildRequires:  python-astroid >= 1.5.3
21 BuildRequires:  python-certifi >= 2017.4.17
22 BuildRequires:  python-chardet >= 3.0.2
23 BuildRequires:  python-devel
24 BuildRequires:  python-idna >= 2.5
25 BuildRequires:  python-isort
26 BuildRequires:  python-lazy-object-proxy
27 BuildRequires:  python-mccabe
28 BuildRequires:  python-modules >= 1:2.5
29 BuildRequires:  python-setuptools >= 7.0
30 BuildRequires:  python-wrapt
31 BuildConflicts: python-chardet >= 3.1.0
32 BuildConflicts: python-idna >= 2.7
33 %endif
34 %if %{with python3}
35 BuildRequires:  python3-2to3
36 BuildRequires:  python3-astroid >= 1.5.3
37 BuildRequires:  python3-certifi >= 2017.4.17
38 BuildRequires:  python3-chardet >= 3.0.2
39 BuildRequires:  python3-devel
40 BuildRequires:  python3-idna >= 2.5
41 BuildRequires:  python3-isort
42 BuildRequires:  python3-lazy-object-proxy
43 BuildRequires:  python3-mccabe
44 BuildRequires:  python3-modules >= 1:3.2
45 BuildRequires:  python3-setuptools >= 7.0
46 BuildRequires:  python3-wrapt
47 BuildConflicts: python3-chardet >= 3.1.0
48 BuildConflicts: python3-idna >= 2.7
49 %endif
50 BuildRequires:  rpm-pythonprov
51 BuildRequires:  rpmbuild(macros) >= 1.219
52 BuildRequires:  sphinx-pdg
53 Requires:       python-pylint = %{version}-%{release}
54 Suggests:       python-devel-src
55 BuildArch:      noarch
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 # /etc/pylintrc is deliberately packaged to both packages with same name
59 %define         _duplicate_files_terminate_build        0
60
61 # current Python 3.x provides all these
62 %define         _noautoreq      python3egg.backports.functools-lru-cache python3egg.configparser python3egg.singledispatch
63
64 %description
65 Python 2 tool that checks if a module satisfy a coding standard.
66
67 %description -l pl.UTF-8
68 Narzędzie Pythona 2 sprawdzające zgodność modułów napisanych w języku
69 Python z regułami tworzenia kodu źródłowego.
70
71 %package -n python-pylint
72 Summary:        Python 2 tool that checks if a module satisfy a coding standard (modules)
73 Summary(pl.UTF-8):      Narzędzie Pythona sprawdzające zgodność modułu ze standardem kodowania (moduły)
74 Group:          Libraries/Python
75
76 %description -n python-pylint
77 Python 2 tool that checks if a module satisfy a coding standard.
78
79 This package contains only the Python modules used by the tool.
80
81 %description -n python-pylint -l pl.UTF-8
82 Narzędzie Pythona 2 sprawdzające zgodność modułów napisanych w języku
83 Python z regułami tworzenia kodu źródłowego.
84
85 Ten pakiet zawiera tylko moduły Pythona używane przez to narzędzie.
86
87 %package -n py3lint
88 Summary:        Python 3 tool that checks if a module satisfy a coding standard
89 Summary(pl.UTF-8):      Narzędzie Pythona 3 sprawdzające zgodność modułu ze standardem kodowania
90 Group:          Development/Languages/Python
91 Requires:       python3-pylint = %{version}-%{release}
92 Obsoletes:      pylint-python3 < 1.0.0-2
93
94 %description -n py3lint
95 Python 3 tool that checks if a module satisfy a coding standard.
96
97 Python 3.x version, available via the 'py3lint' command.
98
99 %description -n py3lint -l pl.UTF-8
100 Narzędzie Pythona 3 sprawdzające zgodność modułów napisanych w języku
101 Python z regułami tworzenia kodu źródłowego.
102
103 Wersja dla Pythona 3.x, dostępna przez polecenie 'py3lint'.
104
105 %package -n python3-pylint
106 Summary:        Python 3 tool that checks if a module satisfy a coding standard (moduły)
107 Summary(pl.UTF-8):      Narzędzie Pythona 3 sprawdzające zgodność modułu ze standardem kodowania (modules)
108 Group:          Libraries/Python
109
110 %description -n python3-pylint
111 Python 3 tool that checks if a module satisfy a coding standard.
112
113 This package contains only the Python modules used by the tool.
114
115 %description -n python3-pylint -l pl.UTF-8
116 Narzędzie Pythona 3 sprawdzające zgodność modułów napisanych w języku
117 Python z regułami tworzenia kodu źródłowego.
118
119 Ten pakiet zawiera tylko moduły Pythona używane przez to narzędzie.
120
121 %prep
122 %setup -q -n pylint-pylint-%{version}
123
124 %build
125 %if %{with python2}
126 %py_build
127 %endif
128
129 %if %{with python3}
130 %py3_build
131 %endif
132
133 %{__make} -C doc text \
134         PYTHONPATH=$PWD
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1}
139
140 %if %{with python3}
141 %py3_install
142
143 %{__mv} $RPM_BUILD_ROOT%{_bindir}/epylint $RPM_BUILD_ROOT%{_bindir}/epy3lint
144 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pylint $RPM_BUILD_ROOT%{_bindir}/py3lint
145 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pyreverse $RPM_BUILD_ROOT%{_bindir}/py3reverse
146 cp -p man/epylint.1 $RPM_BUILD_ROOT%{_mandir}/man1/epy3lint.1
147 cp -p man/pylint.1 $RPM_BUILD_ROOT%{_mandir}/man1/py3lint.1
148 cp -p man/pyreverse.1 $RPM_BUILD_ROOT%{_mandir}/man1/py3reverse.1
149 %endif
150
151 %if %{with python2}
152 %py_install
153 %py_postclean
154 cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
155 %endif
156
157 cp -p examples/pylintrc $RPM_BUILD_ROOT%{_sysconfdir}/pylintrc
158
159 %clean
160 rm -rf $RPM_BUILD_ROOT
161
162 %if %{with python2}
163 %files
164 %defattr(644,root,root,755)
165 %doc ChangeLog README.rst examples/* doc/_build/text/*.txt
166 %attr(755,root,root) %{_bindir}/epylint
167 %attr(755,root,root) %{_bindir}/pylint
168 %attr(755,root,root) %{_bindir}/pyreverse
169 %attr(755,root,root) %{_bindir}/symilar
170 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc
171 %{_mandir}/man1/epylint.1*
172 %{_mandir}/man1/pylint.1*
173 %{_mandir}/man1/pyreverse.1*
174 %{_mandir}/man1/symilar.1*
175
176 %files -n python-pylint
177 %defattr(644,root,root,755)
178 %{py_sitescriptdir}/pylint
179 %{py_sitescriptdir}/pylint-%{version}-py*.egg-info
180 %endif
181
182 %if %{with python3}
183 %files -n py3lint
184 %defattr(644,root,root,755)
185 %doc ChangeLog README.rst examples/* doc/_build/text/*.txt
186 %attr(755,root,root) %{_bindir}/epy3lint
187 %attr(755,root,root) %{_bindir}/py3lint
188 %attr(755,root,root) %{_bindir}/py3reverse
189 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc
190 %{_mandir}/man1/epy3lint.1*
191 %{_mandir}/man1/py3lint.1*
192 %{_mandir}/man1/py3reverse.1*
193
194 %files -n python3-pylint
195 %defattr(644,root,root,755)
196 %{py3_sitescriptdir}/pylint
197 %{py3_sitescriptdir}/pylint-%{version}-py*.egg-info
198 %endif
This page took 0.043865 seconds and 3 git commands to generate.