!3 Package init

From: @li-miaomiao_zhr 
Reviewed-by: @xiyuanwang 
Signed-off-by: @xiyuanwang
This commit is contained in:
openeuler-ci-bot 2023-07-12 02:31:21 +00:00 committed by Gitee
commit dcb3e1ebee
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 62 additions and 0 deletions

BIN
pytest-black-0.3.12.tar.gz Normal file

Binary file not shown.

62
pytest-black.spec Normal file
View File

@ -0,0 +1,62 @@
%global _empty_manifest_terminate_build 0
%global pypi_name pytest-black
Name: python-%{pypi_name}
Version: 0.3.12
Release: 1
Summary: A pytest plugin to enable format checking with black
License: MIT
URL: https://pypi.org/project/pytest-black/
Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(pytest)
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
BuildRequires: python3-pip
BuildRequires: python3-toml
Requires: python3-black
%description
A pytest plugin to enable format checking with black.
%package -n python3-%{pypi_name}
Summary: %{summary}
%description -n python3-%{pypi_name}
A pytest plugin to enable format checking with black.
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py3_build
%install
%py3_install
%check
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \
PATH="%{buildroot}%{_bindir}:$PATH" \
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}" \
PYTHONDONTWRITEBYTECODE=1 \
%{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"} \
PYTEST_XDIST_AUTO_NUM_WORKERS=%{_smp_build_ncpus} \
%{_bindir}/pytest
%files -n python3-%{pypi_name}
%doc README.md
%{python3_sitelib}/pytest_black-*.egg-info/
%{python3_sitelib}/pytest_black.py
%{python3_sitelib}/__pycache__/
%changelog
* Wed Jul 5 2023 li-miaomiao_zhr <mmlidc@isoftstone.com> - 0.3.12-1
- Package init