use python-build to fix uninstalled files [release 0.4.8-3mamba;Sat May 28 2022]

This commit is contained in:
Silvan Calarco 2024-01-06 11:27:11 +01:00
parent e1d99a005f
commit 1108466fa7

View File

@ -1,19 +1,26 @@
%define pkgname %(echo %name | cut -d- -f2- | tr - _) %define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: python-mechanize Name: python-mechanize
Version: 0.4.8 Version: 0.4.8
Release: 2mamba Release: 3mamba
Summary: Stateful programmatic web browsing in Python Summary: Stateful programmatic web browsing in Python
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/python-mechanize/mechanize URL: https://github.com/python-mechanize/mechanize
#Source: https://github.com/python-mechanize/mechanize.git/v%{version}/mechanize-%{version}.tar.bz2
Source: https://pypi.debian.net/mechanize/mechanize-%{version}.tar.gz Source: https://pypi.debian.net/mechanize/mechanize-%{version}.tar.gz
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: libpython3-devel BuildRequires: libpython3-devel
BuildRequires: python3.7dist(html5lib) BuildRequires: python3.7dist(html5lib)
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: python-build-py3
BuildRequires: python-wheel-py3
BuildRequires: python-python_install-py3
BuildRequires: python-build-py310
BuildRequires: python-wheel-py310
BuildRequires: python-python_install-py310
%description %description
Stateful programmatic web browsing in Python, after Andy Lesters Perl module WWW::Mechanize. Stateful programmatic web browsing in Python, after Andy Lesters Perl module WWW::Mechanize.
@ -27,26 +34,25 @@ Stateful programmatic web browsing in Python, after Andy Lesters Perl module
#%patch0 -p1 #%patch0 -p1
%build %build
CFLAGS="%{optflags}" %{__python} setup.py build %{__python} -m build --wheel --skip-dependency-check
#--no-isolation
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} setup.py install \ %{__python} -m venv --system-site-packages test-env
-O1 --skip-build \ %{__python} -m install --optimize=1 --destdir="%{buildroot}" dist/*.whl
--root="%{buildroot}" \
--install-headers=%{python_inc} \
--install-lib=%{python_sitearch} \
--record=%{name}.filelist
sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
%files %{?pyappend} %files %{?pyappend}
#-f %{name}.filelist
%defattr(-,root,root) %defattr(-,root,root)
%dir %{python_sitearch}/%{pkgname}-%{version}-py*.egg-info %dir %{python_sitelib}/%{pkgname}
%{python_sitearch}/%{pkgname}-%{version}-py*.egg-info/* %{python_sitelib}/%{pkgname}/*
%dir %{python_sitelib}/%{pkgname}-%{version}.dist-info
%{python_sitelib}/%{pkgname}-%{version}.dist-info/*
%changelog %changelog
* Sat May 28 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.8-3mamba
- use python-build to fix uninstalled files
* Thu May 05 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.8-2mamba * Thu May 05 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.4.8-2mamba
- rebuilt with distdeps and python 3.10 subpackage - rebuilt with distdeps and python 3.10 subpackage