python-jsonschema/python-jsonschema.spec
2022-12-16 00:29:29 +08:00

72 lines
2.0 KiB
RPMSpec

%global pypi_name jsonschema
%global _description \
jsonschema is JSON Schema validator currently based on http://tools.ietf.org/html/draft-zyp-json-schema-03
Name: python-%{pypi_name}
Version: 4.17.3
Release: 1
Summary: An implementation of JSON Schema validation for Python
License: MIT
URL: http://pypi.python.org/pypi/jsonschema
Source0: https://files.pythonhosted.org/packages/36/3d/ca032d5ac064dff543aa13c984737795ac81abc9fb130cd2fcff17cfabc7/jsonschema-4.17.3.tar.gz
BuildArch: noarch
BuildRequires: python3-devel python3-setuptools python3-setuptools_scm
# test requirements
%bcond_without tests
%if %{without tests}
BuildRequires: python3dist(attrs)
BuildRequires: python3dist(perf)
BuildRequires: python3dist(pyrsistent)
BuildRequires: python3dist(six)
BuildRequires: python3dist(twisted)
%endif
%description %{_description}
%package -n python%{python3_pkgversion}-%{pypi_name}
Summary: An implementation of JSON Schema validation for Python %{python3_version}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
%description -n python%{python3_pkgversion}-%{pypi_name} %{_description}
%package_help
%prep
%autosetup -n %{pypi_name}-%{version} -p1
touch setup.py
echo "from setuptools import setup" > setup.py
echo "setup(use_scm_version=True)" >> setup.py
%build
%py3_build
%install
%py3_install
%if %{without tests}
%check
%{__python3} setup.py test --test-suite=jsonschema.tests
%endif
%files -n python%{python3_pkgversion}-%{pypi_name}
%license COPYING
%{python3_sitelib}/*.egg-info
%files help
%doc README.rst PKG-INFO
%changelog
* Fri Dec 16 2022 lijian <lijian2@kylinos.cn> - 4.17.3-1
- update to upstream version 4.17.3
* Tue Sep 27 2022 wangjunqi <wangjunqi@kylinos.cn> - 4.0.1-1
- update version to 4.0.1
* Wed Jul 29 2020 jinzhimin<jinzhimin2@huawei.com> - 3.2.0-1
- update to 3.2.0
* Sun Sep 15 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.6.0-6
- Package init