]> git.pld-linux.org Git - packages/pylint.git/blob - pylint.spec
Version: 1.5.1
[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
8 Summary:        Python tool that checks if a module satisfy a coding standard
9 Summary(pl.UTF-8):      Pythonowe narzędzie sprawdzające zgodność modułu ze standardem kodowania
10 Name:           pylint
11 Version:        1.5.1
12 Release:        1
13 License:        GPL v2+
14 Group:          Development/Languages/Python
15 #Source0Download: https://pypi.python.org/pypi/pylint
16 Source0:        https://pypi.python.org/packages/source/p/pylint/pylint-%{version}.tar.gz
17 # Source0-md5:  60d4be0d6d8d41b251985d7ad65c99eb
18 URL:            http://www.pylint.org/
19 %if %{with python2}
20 BuildRequires:  python-devel
21 BuildRequires:  python-modules >= 1:2.5
22 BuildRequires:  python-setuptools >= 7.0
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-2to3
26 BuildRequires:  python3-devel
27 BuildRequires:  python3-modules >= 1:3.2
28 BuildRequires:  python3-setuptools >= 7.0
29 %endif
30 BuildRequires:  rpm-pythonprov
31 BuildRequires:  rpmbuild(macros) >= 1.219
32 BuildRequires:  sphinx-pdg
33 Requires:       python-astroid >= 1.3.2
34 Requires:       python-logilab-common >= 0.53.0
35 Requires:       python-modules
36 Requires:       python-six
37 Suggests:       python-devel-src
38 BuildArch:      noarch
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 # /etc/pylintrc is deliberately packaged to both packages with same name
42 %define         _duplicate_files_terminate_build        0
43
44 %description
45 Python tool that checks if a module satisfy a coding standard.
46
47 %description -l pl.UTF-8
48 Narzędzie sprawdzające zgodność modułów napisanych w języku Python z
49 regułami tworzenia kodu źródłowego.
50
51 %package gui
52 Summary:        GUI for pylint
53 Summary(pl.UTF-8):      Graficzny interfejs użytkownika dla pylinta
54 Group:          Development/Languages/Python
55 Requires:       %{name} = %{version}-%{release}
56 Requires:       python-tkinter
57
58 %description gui
59 Tk based GUI for pylint.
60
61 %description gui -l pl.UTF-8
62 Oparty na bibliotece Tk graficzny interfejs użytkownika dla pylinta.
63
64 %package -n py3lint
65 Summary:        Python tool that checks if a module satisfy a coding standard
66 Summary(pl.UTF-8):      Pythonowe narzędzie sprawdzające zgodność modułu ze standardem kodowania
67 Group:          Development/Languages/Python
68 Requires:       python3-astroid >= 1.3.2
69 Requires:       python3-logilab-common >= 0.53.0
70 Requires:       python3-six
71 Obsoletes:      pylint-python3 < 1.0.0-2
72
73 %description -n py3lint
74 Python tool that checks if a module satisfy a coding standard.
75
76 Python 3.x version, available via the 'py3lint' command.
77
78 %description -n py3lint -l pl.UTF-8
79 Narzędzie sprawdzające zgodność modułów napisanych w języku Python z
80 regułami tworzenia kodu źródłowego.
81
82 Wersja dla Pythona 3.x, dostępna przez polecenie 'py3lint'.
83
84 %package -n py3lint-gui
85 Summary:        GUI for pylint
86 Summary(pl.UTF-8):      Graficzny interfejs użytkownika dla pylinta
87 Group:          Development/Languages/Python
88 Requires:       py3lint = %{version}-%{release}
89 Requires:       python3-tkinter
90 Obsoletes:      pylint-python3-gui < 1.0.0-2
91
92 %description -n py3lint-gui
93 Tk based GUI for pylint.
94
95 %description -n py3lint-gui -l pl.UTF-8
96 Oparty na bibliotece Tk graficzny interfejs użytkownika dla pylinta.
97
98 %prep
99 %setup -q
100
101 %build
102 %if %{with python2}
103 %py_build
104 %endif
105
106 %if %{with python3}
107 %py3_build
108 %endif
109
110 %{__make} -C doc text \
111         PYTHONPATH=$PWD
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1}
116
117 %if %{with python3}
118 %py3_install
119
120 mv $RPM_BUILD_ROOT%{_bindir}/epylint $RPM_BUILD_ROOT%{_bindir}/epy3lint
121 mv $RPM_BUILD_ROOT%{_bindir}/pylint $RPM_BUILD_ROOT%{_bindir}/py3lint
122 mv $RPM_BUILD_ROOT%{_bindir}/pylint-gui $RPM_BUILD_ROOT%{_bindir}/py3lint-gui
123 mv $RPM_BUILD_ROOT%{_bindir}/pyreverse $RPM_BUILD_ROOT%{_bindir}/py3reverse
124 cp -p man/epylint.1 $RPM_BUILD_ROOT%{_mandir}/man1/epy3lint.1
125 cp -p man/pylint.1 $RPM_BUILD_ROOT%{_mandir}/man1/py3lint.1
126 cp -p man/pylint-gui.1 $RPM_BUILD_ROOT%{_mandir}/man1/py3lint-gui.1
127 cp -p man/pyreverse.1 $RPM_BUILD_ROOT%{_mandir}/man1/py3reverse.1
128 %endif
129
130 %if %{with python2}
131 %py_install
132 %py_postclean
133 cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
134 %endif
135
136 cp -p examples/pylintrc $RPM_BUILD_ROOT%{_sysconfdir}/pylintrc
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %if %{with python2}
142 %files
143 %defattr(644,root,root,755)
144 %doc ChangeLog README examples/* doc/_build/text/*.txt
145 %attr(755,root,root) %{_bindir}/epylint
146 %attr(755,root,root) %{_bindir}/pylint
147 %attr(755,root,root) %{_bindir}/pyreverse
148 %attr(755,root,root) %{_bindir}/symilar
149 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc
150 %{py_sitescriptdir}/pylint
151 %{py_sitescriptdir}/pylint-%{version}-py*.egg-info
152 %{_mandir}/man1/epylint.1*
153 %{_mandir}/man1/pylint.1*
154 %{_mandir}/man1/pyreverse.1*
155 %{_mandir}/man1/symilar.1*
156
157 %files gui
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_bindir}/pylint-gui
160 %{_mandir}/man1/pylint-gui.1*
161 %endif
162
163 %if %{with python3}
164 %files -n py3lint
165 %defattr(644,root,root,755)
166 %doc ChangeLog README examples/* doc/_build/text/*.txt
167 %attr(755,root,root) %{_bindir}/epy3lint
168 %attr(755,root,root) %{_bindir}/py3lint
169 %attr(755,root,root) %{_bindir}/py3reverse
170 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc
171 %{py3_sitescriptdir}/pylint
172 %{py3_sitescriptdir}/pylint-%{version}-py*.egg-info
173 %{_mandir}/man1/epy3lint.1*
174 %{_mandir}/man1/py3lint.1*
175 %{_mandir}/man1/py3reverse.1*
176
177 %files -n py3lint-gui
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_bindir}/py3lint-gui
180 %{_mandir}/man1/py3lint-gui.1*
181 %endif
This page took 0.073869 seconds and 4 git commands to generate.