fix conflicting binary pylint-config [release 2.17.5-2mamba;Sun Sep 10 2023]

This commit is contained in:
Silvan Calarco 2024-01-05 16:26:48 +01:00
parent 0237298b3d
commit 3423b6f996

View File

@ -1,6 +1,7 @@
%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: python-pylint
Version: 2.14.5
Release: 3mamba
Version: 2.17.5
Release: 2mamba
Summary: Python code static checker
Group: Development/Libraries/Python
Vendor: openmamba
@ -16,7 +17,6 @@ BuildRequires: python3.7dist(dill)
BuildRequires: python3.7dist(isort)
BuildRequires: python3.7dist(mccabe)
BuildRequires: python3.7dist(platformdirs)
BuildRequires: python3.7dist(setuptools)
BuildRequires: python3.7dist(tomli)
BuildRequires: python3.7dist(tomlkit)
BuildRequires: python3.7dist(typing-extensions)
@ -43,48 +43,47 @@ Obsoletes: pylint-py3 < 2.12.2-2mamba
%prep
%setup -q -n pylint-%{version}
# Remove conflicting build time dependencies
sed -i -E '/^requires/s/~=[0-9.]+//g' pyproject.toml
# Remove overly restrictive dependency
sed -i -e '/>=/{s/>.*//;p}' -e '/python_requires/d' setup.cfg
%build
%{__python} setup.py build
CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} setup.py install \
-O1 --skip-build \
--root="%{buildroot}" \
--install-headers=%{_includedir}/python \
--install-lib=%{python_sitearch} \
--single-version-externally-managed \
--record=%{name}.filelist
%{__python} -m installer --destdir=%{buildroot} dist/*.whl
# Do not package testsuite
rm -rf %{buildroot}%{python_sitelib}/pylint/test
sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz,;\,/test/,d" %{name}.filelist
%if "%{?with_pyver}" != "3"
# Rename any conflicting file outside of python site packages tree
for f in %{_bindir}/{epylint,pylint,pyreverse,symilar}; do
for f in %{_bindir}/{epylint,pylint,pylint-config,pyreverse,symilar}; do
mv %{buildroot}${f}{,-%{?pyappend}}
done
sed -i "\,%{_bindir},d" %{name}.filelist
%endif
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files %{?pyappend} -f %{name}.filelist
%files %{?pyappend}
%defattr(-,root,root)
%{_bindir}/epylint*
%{_bindir}/pylint*
%{_bindir}/pyreverse*
%{_bindir}/symilar*
%dir %{python_sitearch}/pylint-%{version}-py*.egg-info
%{python_sitearch}/pylint-%{version}-py*.egg-info/*
%exclude %{_bindir}
%dir %{python_sitelib}/%{pkgname}-%{version}.dist-info
%{python_sitelib}/%{pkgname}-%{version}.dist-info/*
%dir %{python_sitelib}/%{pkgname}
%{python_sitelib}/%{pkgname}/*
%doc LICENSE
%changelog
* Sun Sep 10 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.17.5-2mamba
- fix conflicting binary pylint-config
* Sat Sep 09 2023 Automatic Build System <autodist@mambasoft.it> 2.17.5-1mamba
- automatic version update by autodist
* Tue Apr 11 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.14.5-3mamba
- fix cross-obsolete in -py3 and -py310 subpackages; remove python-pylint-tools subpackage in favour of renamed binaries