]> git.pld-linux.org Git - packages/pylint.git/blob - pylint.spec
ce1bbde7909d3a8609afa1ec18ffc91f0038cde4
[packages/pylint.git] / pylint.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_with     tests   # unit tests
5
6 Summary:        Python tool that checks if a module satisfy a coding standard
7 Summary(pl.UTF-8):      Narzędzie Pythona sprawdzające zgodność modułu ze standardem kodowania
8 Name:           pylint
9 Version:        2.4.4
10 Release:        2
11 License:        GPL v2+
12 Group:          Development/Languages/Python
13 #Source0Download: https://pypi.org/simple/pylint/
14 Source0:        https://github.com/PyCQA/pylint/archive/%{name}-%{version}.tar.gz
15 # Source0-md5:  21edaf9a0e5d836a23731f81c6bc48c2
16 Patch0:         %{name}-deps.patch
17 URL:            http://www.pylint.org/
18 BuildRequires:  python3-astroid >= 2.3.0
19 BuildRequires:  python3-astroid < 2.4
20 BuildRequires:  python3-devel >= 1:3.5
21 BuildRequires:  python3-mccabe
22 BuildRequires:  python3-modules >= 1:3.5
23 BuildRequires:  python3-setuptools >= 7.0
24 %if %{with tests}
25 BuildRequires:  python3-isort >= 4.2.5
26 BuildRequires:  python3-isort < 5
27 BuildRequires:  python3-mccabe >= 0.6
28 BuildRequires:  python3-mccabe < 0.7
29 %endif
30 BuildRequires:  rpm-pythonprov
31 BuildRequires:  rpmbuild(macros) >= 1.714
32 %if %{with doc}
33 BuildRequires:  sphinx-pdg
34 %endif
35 Requires:       py3lint = %{version}-%{release}
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 Python tool that checks if a module satisfy a coding standard.
41
42 %description -l pl.UTF-8
43 Narzędzie Pythona sprawdzające zgodność modułów napisanych w języku
44 Python z regułami tworzenia kodu źródłowego.
45
46 %package -n py3lint
47 Summary:        Python 3 tool that checks if a module satisfy a coding standard
48 Summary(pl.UTF-8):      Narzędzie Pythona 3 sprawdzające zgodność modułu ze standardem kodowania
49 Group:          Development/Languages/Python
50 Requires:       python3-pylint = %{version}-%{release}
51 Obsoletes:      pylint-python3 < 1.0.0-2
52
53 %description -n py3lint
54 Python 3 tool that checks if a module satisfy a coding standard.
55
56 Python 3.x version, available via the 'py3lint' command.
57
58 %description -n py3lint -l pl.UTF-8
59 Narzędzie Pythona 3 sprawdzające zgodność modułów napisanych w języku
60 Python z regułami tworzenia kodu źródłowego.
61
62 Wersja dla Pythona 3.x, dostępna przez polecenie 'py3lint'.
63
64 %package -n python3-pylint
65 Summary:        Python 3 tool that checks if a module satisfy a coding standard (moduły)
66 Summary(pl.UTF-8):      Narzędzie Pythona 3 sprawdzające zgodność modułu ze standardem kodowania (modules)
67 Group:          Libraries/Python
68
69 %description -n python3-pylint
70 Python 3 tool that checks if a module satisfy a coding standard.
71
72 This package contains only the Python modules used by the tool.
73
74 %description -n python3-pylint -l pl.UTF-8
75 Narzędzie Pythona 3 sprawdzające zgodność modułów napisanych w języku
76 Python z regułami tworzenia kodu źródłowego.
77
78 Ten pakiet zawiera tylko moduły Pythona używane przez to narzędzie.
79
80 %package doc
81 Summary:        Documentation for pylint
82 Summary(pl.UTF-8):      Dokumentacja do pylinta
83 Group:          Documentation
84
85 %description doc
86 Documentation for pylint.
87
88 %description doc -l pl.UTF-8
89 Dokumentacja do pylinta.
90
91 %prep
92 %setup -q -n pylint-pylint-%{version}
93 %patch0 -p1
94
95 %build
96 %py3_build
97
98 %if %{with doc}
99 %{__make} -C doc text \
100         PYTHONPATH=$PWD
101 %endif
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1}
106
107 %py3_install
108
109 for tool in epylint pylint pyreverse symilar ; do
110         %{__mv} $RPM_BUILD_ROOT%{_bindir}/${tool} $RPM_BUILD_ROOT%{_bindir}/${tool}-3
111         ln -s ${tool}-3 $RPM_BUILD_ROOT%{_bindir}/${tool}
112         cp -p man/${tool}.1 $RPM_BUILD_ROOT%{_mandir}/man1/${tool}-3.1
113         echo ".so ${tool}-3.1" >$RPM_BUILD_ROOT%{_mandir}/man1/${tool}.1
114 done
115 # old PLD package compatibility
116 ln -s epylint-3 $RPM_BUILD_ROOT%{_bindir}/epy3lint
117 ln -s pylint-3 $RPM_BUILD_ROOT%{_bindir}/py3lint
118 ln -s pyreverse-3 $RPM_BUILD_ROOT%{_bindir}/py3reverse
119 echo '.so epylint-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/epy3lint.1
120 echo '.so pylint-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/py3lint.1
121 echo '.so pyreverse-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/py3reverse.1
122
123 cp -p examples/pylintrc $RPM_BUILD_ROOT%{_sysconfdir}/pylintrc
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %files
129 %defattr(644,root,root,755)
130 %attr(755,root,root) %{_bindir}/epylint
131 %attr(755,root,root) %{_bindir}/pylint
132 %attr(755,root,root) %{_bindir}/pyreverse
133 %attr(755,root,root) %{_bindir}/symilar
134 %{_mandir}/man1/epylint.1*
135 %{_mandir}/man1/pylint.1*
136 %{_mandir}/man1/pyreverse.1*
137 %{_mandir}/man1/symilar.1*
138
139 %files -n py3lint
140 %defattr(644,root,root,755)
141 %attr(755,root,root) %{_bindir}/epylint-3
142 %attr(755,root,root) %{_bindir}/pylint-3
143 %attr(755,root,root) %{_bindir}/pyreverse-3
144 %attr(755,root,root) %{_bindir}/symilar-3
145 %attr(755,root,root) %{_bindir}/epy3lint
146 %attr(755,root,root) %{_bindir}/py3lint
147 %attr(755,root,root) %{_bindir}/py3reverse
148 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc
149 %{_mandir}/man1/epylint-3.1*
150 %{_mandir}/man1/pylint-3.1*
151 %{_mandir}/man1/pyreverse-3.1*
152 %{_mandir}/man1/symilar-3.1*
153 %{_mandir}/man1/epy3lint.1*
154 %{_mandir}/man1/py3lint.1*
155 %{_mandir}/man1/py3reverse.1*
156
157 %files -n python3-pylint
158 %defattr(644,root,root,755)
159 %doc CONTRIBUTORS.txt ChangeLog README.rst examples
160 %{py3_sitescriptdir}/pylint
161 %{py3_sitescriptdir}/pylint-%{version}-py*.egg-info
162
163 %if %{with doc}
164 %files doc
165 %defattr(644,root,root,755)
166 %doc doc/_build/text/*
167 %endif
This page took 0.098251 seconds and 2 git commands to generate.