!1 fix issue :src-openEuler/python-black目录为空,需要引入该包

From: @li-miaomiao_zhr 
Reviewed-by: @desert-sailor 
Signed-off-by: @desert-sailor
This commit is contained in:
openeuler-ci-bot 2023-06-16 08:32:55 +00:00 committed by Gitee
commit 098d909fd2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 114 additions and 0 deletions

45
0001-add-annotation.patch Normal file
View File

@ -0,0 +1,45 @@
From 48b4765d34428ae22f6a285d5d58a4730826a1bf Mon Sep 17 00:00:00 2001
From: li-miaomiao_zhr <mmlidc@isoftstone.com>
Date: Fri, 16 Jun 2023 15:17:13 +0800
Subject: [PATCH] add annotation
---
pyproject.toml | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 435626a..8e76868 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -26,7 +26,8 @@ preview = true
# NOTE: You don't need this in your own Black configuration.
[build-system]
-requires = ["hatchling>=1.8.0", "hatch-vcs", "hatch-fancy-pypi-readme"]
+#requires = ["hatchling>=1.8.0", "hatch-vcs", "hatch-fancy-pypi-readme"]
+requires = ["hatchling>=1.8.0", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
@@ -93,12 +94,12 @@ blackd = "blackd:patched_main [d]"
Changelog = "https://github.com/psf/black/blob/main/CHANGES.md"
Homepage = "https://github.com/psf/black"
-[tool.hatch.metadata.hooks.fancy-pypi-readme]
-content-type = "text/markdown"
-fragments = [
- { path = "README.md" },
- { path = "CHANGES.md" },
-]
+#[tool.hatch.metadata.hooks.fancy-pypi-readme]
+#content-type = "text/markdown"
+#fragments = [
+# { path = "README.md" },
+# { path = "CHANGES.md" },
+#]
[tool.hatch.version]
source = "vcs"
--
2.39.1

BIN
black-23.3.0.tar.gz Normal file

Binary file not shown.

69
python-black.spec Normal file
View File

@ -0,0 +1,69 @@
Name: python-black
Version: 23.3.0
Release: 1
Summary: The uncompromising code formatter
License: MIT
URL: https://github.com/psf/black
Source: %{pypi_source black}
BuildArch: noarch
BuildRequires: python3-devel
# Base build requires
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
BuildRequires: python3-pip
BuildRequires: python3-wheel
BuildRequires: python3-editables
BuildRequires: python3-hatch-vcs
BuildRequires: python3-hatchling
Patch0: 0001-add-annotation.patch
%global _description %{expand:
Black is the uncompromising Python code formatter. By using it, you agree to
cease control over minutiae of hand-formatting. In return, Black gives you
speed, determinism, and freedom from pycodestyle nagging about formatting.
You will save time and mental energy for more important matters.}
%description %_description
%package -n black
Summary: %{summary}
Recommends: black+d = %{version}-%{release}
%description -n black %_description
%prep
%autosetup -n black-%{version} -p1
%build
%pyproject_build
%install
%pyproject_install
for exe in black blackd; do
ln -sr %{buildroot}%{_bindir}/${exe}{,-%{python3_version}}
done
%files -n black
%license LICENSE
%doc README.md
%{_bindir}/black
%{_bindir}/black-%{python3_version}
%{_bindir}/blackd
%{_bindir}/blackd-%{python3_version}
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/black-%{version}.dist-info/*
%{python3_sitelib}/_black_version.py
%{python3_sitelib}/black/*
%{python3_sitelib}/blackd/*
%{python3_sitelib}/blib2to3/*
%changelog
* Wed Jun 7 2023 li-miaomiao_zhr <mmlidc@isoftstone.com> - 23.3.0-1
- fix issue:add package python-black of version 23.3.0 to warehouse of src-openEuler