!3 Init package with version 2.17.1

From: @desert-sailor 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
This commit is contained in:
openeuler-ci-bot 2023-07-10 05:32:25 +00:00 committed by Gitee
commit 48cc9b7dd6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 70 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,70 @@
%global _empty_manifest_terminate_build 0
%global pypi_name fastjsonschema
%global common_description %{expand:
fastjsonschema implements validation of JSON documents by JSON schema.
The library implements JSON schema drafts 04, 06 and 07.
The main purpose is to have a really fast implementation.
}
Name: python-%{pypi_name}
Version: 2.17.1
Release: 1
Summary: Fastest Python implementation of JSON schema.
License: BSD
URL: https://github.com/horejsek/python-fastjsonschema
Source0: https://files.pythonhosted.org/packages/a4/e1/cda97fa4447e138f1f0ccfdaf678fa247415f7e9f4942d856fd63c7d863c/fastjsonschema-2.17.1.tar.gz
BuildArch: noarch
%description
%{common_description}
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pbr
BuildRequires: python3-pip
BuildRequires: python3-wheel
# test dependencies
BuildRequires: python3-mock
BuildRequires: python3-pytest
BuildRequires: python3-pytest-benchmark
%description -n python3-%{pypi_name}
%{common_description}
%prep
%autosetup -p1 -n %{pypi_name}-%{version}
# Remove upstreams egg info
rm -rf *.egg*
%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.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.egg-info/
%changelog
* Mon Jul 10 2023 Dongxing Wang <dxwangk@isoftstone.com> - 2.17.1-1
- Initial packaging