python-jsonschema/python-jsonschema.spec
2020-07-29 17:30:57 +08:00

65 lines
1.7 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: 3.2.0
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/source/j/jsonschema/%{pypi_name}-%{version}.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
%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
%{_bindir}/jsonschema
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/*.egg-info
%files help
%doc README.rst PKG-INFO
%changelog
* 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