!4 fix package name with python3 prefix

From: @desert-sailor 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
This commit is contained in:
openeuler-ci-bot 2023-07-07 02:55:15 +00:00 committed by Gitee
commit 615a15b521
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,10 +1,13 @@
Name: black
%global _empty_manifest_terminate_build 0
%global pypi_name black
Name: python-%{pypi_name}
Version: 23.3.0
Release: 3
Release: 4
Summary: The uncompromising code formatter
License: MIT
URL: https://github.com/psf/black
Source: %{pypi_source black}
Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
@ -28,15 +31,15 @@ You will save time and mental energy for more important matters.}
%description %_description
%package -n python3-black
%package -n python3-%{pypi_name}
Summary: %{summary}
Recommends: black+d = %{version}-%{release}
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-black %_description
%description -n python3-%{pypi_name} %_description
%prep
%autosetup -n black-%{version} -p1
%autosetup -p1 -n %{pypi_name}-%{version}
%build
%pyproject_build
@ -49,7 +52,7 @@ for exe in black blackd; do
ln -sr %{buildroot}%{_bindir}/${exe}{,-%{python3_version}}
done
%files -n black
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md
%{_bindir}/black
@ -64,6 +67,9 @@ done
%{python3_sitelib}/blib2to3/*
%changelog
* Fri Jul 7 2023 Dongxing Wang <dxwangk@isoftstone.com> - 23.3.0-4
- Fix the black package name
* Wed Jul 5 2023 li-miaomiao_zhr <mmlidc@isoftstone.com> - 23.3.0-3
- Change the software packaging name to "python3 black"