From 1108466fa7bae415e01fe41babe8f6e5e27b10aa Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 11:27:11 +0100 Subject: [PATCH] use python-build to fix uninstalled files [release 0.4.8-3mamba;Sat May 28 2022] --- python-mechanize.spec | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/python-mechanize.spec b/python-mechanize.spec index 233aee5..68bd364 100644 --- a/python-mechanize.spec +++ b/python-mechanize.spec @@ -1,19 +1,26 @@ %define pkgname %(echo %name | cut -d- -f2- | tr - _) Name: python-mechanize Version: 0.4.8 -Release: 2mamba +Release: 3mamba Summary: Stateful programmatic web browsing in Python Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco 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 License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: libpython3-devel BuildRequires: python3.7dist(html5lib) ## 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 Stateful programmatic web browsing in Python, after Andy Lester’s Perl module WWW::Mechanize. @@ -27,26 +34,25 @@ Stateful programmatic web browsing in Python, after Andy Lester’s Perl module #%patch0 -p1 %build -CFLAGS="%{optflags}" %{__python} setup.py build +%{__python} -m build --wheel --skip-dependency-check +#--no-isolation %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -%{__python} setup.py install \ - -O1 --skip-build \ - --root="%{buildroot}" \ - --install-headers=%{python_inc} \ - --install-lib=%{python_sitearch} \ - --record=%{name}.filelist - -sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist +%{__python} -m venv --system-site-packages test-env +%{__python} -m install --optimize=1 --destdir="%{buildroot}" dist/*.whl %files %{?pyappend} -#-f %{name}.filelist %defattr(-,root,root) -%dir %{python_sitearch}/%{pkgname}-%{version}-py*.egg-info -%{python_sitearch}/%{pkgname}-%{version}-py*.egg-info/* +%dir %{python_sitelib}/%{pkgname} +%{python_sitelib}/%{pkgname}/* +%dir %{python_sitelib}/%{pkgname}-%{version}.dist-info +%{python_sitelib}/%{pkgname}-%{version}.dist-info/* %changelog +* Sat May 28 2022 Silvan Calarco 0.4.8-3mamba +- use python-build to fix uninstalled files + * Thu May 05 2022 Silvan Calarco 0.4.8-2mamba - rebuilt with distdeps and python 3.10 subpackage