python-jsonschema/python-jsonschema.spec
2025-02-18 10:43:21 +00:00

80 lines
2.3 KiB
RPMSpec

%define oname jsonschema
Name: python-%{oname}
Version: 2.6.0
Release: 1
Summary: An implementation of JSON Schema validation for Python
URL: https://github.com/Julian/jsonschema
#Source0: http://pypi.python.org/packages/source/j/jsonschema/jsonschema-%{version}.tar.gz
Source0: %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz
License: MIT
Group: Development/Python
BuildArch: noarch
BuildRequires: pkgconfig(python)
BuildRequires: pythonegg(nose)
BuildRequires: pythonegg(mock)
BuildRequires: pythonegg(setuptools)
BuildRequires: pkgconfig(python3)
BuildRequires: python3egg(nose)
BuildRequires: python3egg(mock)
Requires: python3-%{oname}
%description
jsonschema is JSON Schema validator currently based on
http://tools.ietf.org/html/draft-zyp-json-schema-03
#------------------------------------------------------------------
%package -n python3-%{oname}
Group: Development/Python
%description -n python3-%{oname}
Python 3.4 introduced official support for enumerations. This is a
backport of that feature to Python 3.3, 3.2, 3.1, 2.7, 2.5, 2.5, and 2.4.
An enumeration is a set of symbolic names (members) bound to unique,
constant values. Within an enumeration, the members can be compared by
identity, and the enumeration itself can be iterated over.
This module defines two enumeration classes that can be used to define
unique sets of names and values: Enum and IntEnum. It also defines one
decorator, unique, that ensures only unique member names are present
in an enumeration.
%files -n python3-%{oname}
%doc CHANGELOG.rst COPYING README.rst
%{_bindir}/jsonschema
%{py3_puresitedir}/jsonschema/*.py*
%{py3_puresitedir}/jsonschema/tests/*.py*
%{py3_puresitedir}/jsonschema*.egg-info
%{py3_puresitedir}/jsonschema/schemas/draft*.json
#------------------------------------------------------------------
%prep
%setup -q -n %{oname}-%{version}
cat "%{version} > version.txt
%build
#python setup.py build
#python3 setup.py build
%py_build
%py3_build
%install
#python setup.py install --root=%{buildroot}
#python3 setup.py install --root=%{buildroot}
%py_install
%py3_install
%check
#{_bindir}/nosetests-2* -v || :
%files
%doc CHANGELOG.rst COPYING README.rst
%{py_puresitedir}/jsonschema/*.py*
%{py_puresitedir}/jsonschema/tests/*.py*
%{py_puresitedir}/jsonschema*.egg-info
%{py_puresitedir}/jsonschema/schemas/draft*.json