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