[packages/python3-chardet] use %py3_*_pyproject macros
atler
atler at pld-linux.org
Fri Apr 11 22:01:33 CEST 2025
commit 079f6a3ae27705800c58d9139b6ab1ae863fd842
Author: Jan Palus <atler at pld-linux.org>
Date: Fri Apr 11 21:51:45 2025 +0200
use %py3_*_pyproject macros
python3-chardet.spec | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/python3-chardet.spec b/python3-chardet.spec
index 270238e..fc7764c 100644
--- a/python3-chardet.spec
+++ b/python3-chardet.spec
@@ -17,7 +17,9 @@ Source0: https://files.pythonhosted.org/packages/source/c/chardet/%{module}-%{ve
Patch0: failtest.patch
URL: https://pypi.org/project/chardet/
BuildRequires: python3 >= 1:3.7
+BuildRequires: python3-build
BuildRequires: python3-devel >= 1:3.7
+BuildRequires: python3-installer
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-hypothesis
@@ -28,7 +30,7 @@ BuildRequires: python3-sphinx_rtd_theme
BuildRequires: sphinx-pdg-3
%endif
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
+BuildRequires: rpmbuild(macros) >= 2.044
Requires: python3-modules >= 1:3.7
Conflicts: python-chardet < 4.0.0-7
BuildArch: noarch
@@ -56,14 +58,8 @@ Dokumentacja API modułu Pythona chardet.
%setup -q -n %{module}-%{version}
%patch -P 0 -p1
-cat > setup.py <<EOF
-#!%{_bindir}/python3
-from setuptools import setup
-setup()
-EOF
-
%build
-%py3_build
+%py3_build_pyproject
%if %{with tests}
%{__python3} -m pytest test.py
@@ -78,9 +74,7 @@ PYTHONPATH=$(pwd) \
%install
rm -rf $RPM_BUILD_ROOT
-%py3_install
-
-%py_postclean
+%py3_install_pyproject
%clean
rm -rf $RPM_BUILD_ROOT
@@ -90,7 +84,7 @@ rm -rf $RPM_BUILD_ROOT
%doc README.rst
%attr(755,root,root) %{_bindir}/chardetect
%{py3_sitescriptdir}/chardet
-%{py3_sitescriptdir}/chardet-%{version}-py*.egg-info
+%{py3_sitescriptdir}/chardet-%{version}.dist-info
%if %{with doc}
%files apidocs
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-chardet.git/commitdiff/079f6a3ae27705800c58d9139b6ab1ae863fd842
More information about the pld-cvs-commit
mailing list