]> git.pld-linux.org Git - packages/pylint.git/blob - pylint.spec
- disable sphinx -W option to allow build without network; release 2
[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.15.2
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/v%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  02a41a1ea1576d89614f6b2cffff48f6
16 URL:            https://www.pylint.org/
17 BuildRequires:  python3-devel >= 1:3.7.2
18 BuildRequires:  python3-modules >= 1:3.7.2
19 BuildRequires:  python3-setuptools >= 1:62.6
20 %if %{with tests} || %{with doc}
21 BuildRequires:  python3-astroid >= 2.12.9
22 BuildRequires:  python3-astroid < 2.14
23 BuildRequires:  python3-dill >= 0.2
24 BuildRequires:  python3-isort >= 4.2.5
25 BuildRequires:  python3-isort < 6
26 BuildRequires:  python3-mccabe >= 0.6
27 BuildRequires:  python3-mccabe < 0.8
28 BuildRequires:  python3-platformdirs >= 2.2.0
29 %if "%{_ver_lt '%{py3_ver}' '3.11'}" == "1"
30 BuildRequires:  python3-tomli >= 1.1.0
31 %endif
32 BuildRequires:  python3-tomlkit >= 0.10.1
33 %if "%{_ver_lt '%{py3_ver}' '3.10'}" == "1"
34 BuildRequires:  python3-typing_extensions >= 3.10.0
35 %endif
36 %endif
37 %if %{with tests}
38 BuildRequires:  python3-pytest
39 %endif
40 BuildRequires:  rpm-pythonprov
41 BuildRequires:  rpmbuild(macros) >= 1.749
42 %if %{with doc}
43 BuildRequires:  python3-furo >= 2021.9
44 # >= 2022.6.21 when available
45 #BuildRequires: python3-myst_parser >= 0.18
46 BuildRequires:  python3-myst_parser < 1
47 BuildRequires:  python3-sphinx_reredirects < 1
48 BuildRequires:  sphinx-pdg-3 >= 4.5
49 # >= 5.1.1 when available
50 %endif
51 Requires:       py3lint = %{version}-%{release}
52 BuildArch:      noarch
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
56 Python tool that checks if a module satisfy a coding standard.
57
58 %description -l pl.UTF-8
59 Narzędzie Pythona sprawdzające zgodność modułów napisanych w języku
60 Python z regułami tworzenia kodu źródłowego.
61
62 %package -n py3lint
63 Summary:        Python 3 tool that checks if a module satisfy a coding standard
64 Summary(pl.UTF-8):      Narzędzie Pythona 3 sprawdzające zgodność modułu ze standardem kodowania
65 Group:          Development/Languages/Python
66 Requires:       python3-pylint = %{version}-%{release}
67 Obsoletes:      pylint-python3 < 1.0.0-2
68
69 %description -n py3lint
70 Python 3 tool that checks if a module satisfy a coding standard.
71
72 Python 3.x version, available via the 'py3lint' command.
73
74 %description -n py3lint -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 Wersja dla Pythona 3.x, dostępna przez polecenie 'py3lint'.
79
80 %package -n python3-pylint
81 Summary:        Python 3 tool that checks if a module satisfy a coding standard (moduły)
82 Summary(pl.UTF-8):      Narzędzie Pythona 3 sprawdzające zgodność modułu ze standardem kodowania (modules)
83 Group:          Libraries/Python
84 Requires:       python3-modules >= 1:3.7.2
85
86 %description -n python3-pylint
87 Python 3 tool that checks if a module satisfy a coding standard.
88
89 This package contains only the Python modules used by the tool.
90
91 %description -n python3-pylint -l pl.UTF-8
92 Narzędzie Pythona 3 sprawdzające zgodność modułów napisanych w języku
93 Python z regułami tworzenia kodu źródłowego.
94
95 Ten pakiet zawiera tylko moduły Pythona używane przez to narzędzie.
96
97 %package doc
98 Summary:        Documentation for pylint
99 Summary(pl.UTF-8):      Dokumentacja do pylinta
100 Group:          Documentation
101
102 %description doc
103 Documentation for pylint.
104
105 %description doc -l pl.UTF-8
106 Dokumentacja do pylinta.
107
108 %prep
109 %setup -q
110
111 # stub for setuptools
112 cat >setup.py <<EOF
113 from setuptools import setup
114 setup()
115 EOF
116
117 # disable errors on warnings caused by unreachable network
118 %{__sed} -i -e '/ALLSPHINXOPTS/ s/ -W / /' doc/Makefile
119
120 %build
121 %py3_build
122
123 %if %{with doc}
124 %{__make} -C doc build-html \
125         PYTHONPATH=$PWD \
126         SPHINXBUILD=sphinx-build-3
127 %endif
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131 install -d $RPM_BUILD_ROOT%{_sysconfdir}
132
133 %py3_install
134
135 for tool in epylint pylint pylint-config pyreverse symilar ; do
136         %{__mv} $RPM_BUILD_ROOT%{_bindir}/${tool} $RPM_BUILD_ROOT%{_bindir}/${tool}-3
137         ln -s ${tool}-3 $RPM_BUILD_ROOT%{_bindir}/${tool}
138 done
139 # old PLD package compatibility
140 ln -s epylint-3 $RPM_BUILD_ROOT%{_bindir}/epy3lint
141 ln -s pylint-3 $RPM_BUILD_ROOT%{_bindir}/py3lint
142 ln -s pyreverse-3 $RPM_BUILD_ROOT%{_bindir}/py3reverse
143
144 cp -p examples/pylintrc $RPM_BUILD_ROOT%{_sysconfdir}/pylintrc
145
146 %clean
147 rm -rf $RPM_BUILD_ROOT
148
149 %files
150 %defattr(644,root,root,755)
151 %attr(755,root,root) %{_bindir}/epylint
152 %attr(755,root,root) %{_bindir}/pylint
153 %attr(755,root,root) %{_bindir}/pylint-config
154 %attr(755,root,root) %{_bindir}/pyreverse
155 %attr(755,root,root) %{_bindir}/symilar
156
157 %files -n py3lint
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_bindir}/epylint-3
160 %attr(755,root,root) %{_bindir}/pylint-3
161 %attr(755,root,root) %{_bindir}/pylint-config-3
162 %attr(755,root,root) %{_bindir}/pyreverse-3
163 %attr(755,root,root) %{_bindir}/symilar-3
164 %attr(755,root,root) %{_bindir}/epy3lint
165 %attr(755,root,root) %{_bindir}/py3lint
166 %attr(755,root,root) %{_bindir}/py3reverse
167 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc
168
169 %files -n python3-pylint
170 %defattr(644,root,root,755)
171 %doc CONTRIBUTORS.txt README.rst examples
172 %{py3_sitescriptdir}/pylint
173 %{py3_sitescriptdir}/pylint-%{version}-py*.egg-info
174
175 %if %{with doc}
176 %files doc
177 %defattr(644,root,root,755)
178 %doc doc/_build/html/*
179 %endif
This page took 0.131659 seconds and 4 git commands to generate.