mirror of
https://abf.rosa.ru/djam/python-jsonschema.git
synced 2025-02-23 08:22:52 +00:00
This commit is contained in:
parent
321f53b9bd
commit
dc51572dc6
1 changed files with 67 additions and 10 deletions
|
@ -1,11 +1,11 @@
|
||||||
%define oname jsonschema
|
%define oname jsonschema
|
||||||
|
%define py38 1
|
||||||
|
|
||||||
Name: python-%{oname}
|
Name: python-%{oname}
|
||||||
Version: 2.6.0
|
Version: 2.6.0
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: An implementation of JSON Schema validation for Python
|
Summary: An implementation of JSON Schema validation for Python
|
||||||
URL: https://github.com/Julian/jsonschema
|
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
|
Source0: %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Python
|
Group: Development/Python
|
||||||
|
@ -18,8 +18,16 @@ BuildRequires: pythonegg(setuptools)
|
||||||
BuildRequires: pkgconfig(python3)
|
BuildRequires: pkgconfig(python3)
|
||||||
BuildRequires: python3egg(nose)
|
BuildRequires: python3egg(nose)
|
||||||
BuildRequires: python3egg(mock)
|
BuildRequires: python3egg(mock)
|
||||||
|
BuildRequires: python3egg(setuptools)
|
||||||
|
|
||||||
Requires: python3-%{oname}
|
%if %{py38}
|
||||||
|
BuildRequires: pkgconfig(python-3.8)
|
||||||
|
BuildRequires: python38-nose
|
||||||
|
BuildRequires: python38-mock
|
||||||
|
BuildRequires: python38-setuptools
|
||||||
|
%endif
|
||||||
|
|
||||||
|
#Requires: python3-%{oname}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
jsonschema is JSON Schema validator currently based on
|
jsonschema is JSON Schema validator currently based on
|
||||||
|
@ -31,7 +39,7 @@ http://tools.ietf.org/html/draft-zyp-json-schema-03
|
||||||
Group: Development/Python
|
Group: Development/Python
|
||||||
|
|
||||||
%description -n python3-%{oname}
|
%description -n python3-%{oname}
|
||||||
Python 3.4 introduced official support for enumerations. This is a
|
Python 3.5 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.
|
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,
|
An enumeration is a set of symbolic names (members) bound to unique,
|
||||||
|
@ -45,35 +53,84 @@ in an enumeration.
|
||||||
|
|
||||||
%files -n python3-%{oname}
|
%files -n python3-%{oname}
|
||||||
%doc CHANGELOG.rst COPYING README.rst
|
%doc CHANGELOG.rst COPYING README.rst
|
||||||
%{_bindir}/jsonschema
|
%{_bindir}/jsonschema3
|
||||||
%{py3_puresitedir}/jsonschema/*.py*
|
%{py3_puresitedir}/jsonschema/*.py*
|
||||||
%{py3_puresitedir}/jsonschema/tests/*.py*
|
%{py3_puresitedir}/jsonschema/tests/*.py*
|
||||||
%{py3_puresitedir}/jsonschema*.egg-info
|
%{py3_puresitedir}/jsonschema*.egg-info
|
||||||
%{py3_puresitedir}/jsonschema/schemas/draft*.json
|
%{py3_puresitedir}/jsonschema/schemas/draft*.json
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------
|
||||||
|
%if %{py38}
|
||||||
|
|
||||||
|
%package -n python38-%{oname}
|
||||||
|
Group: Development/Python
|
||||||
|
|
||||||
|
%description -n python38-%{oname}
|
||||||
|
Python 3.8 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 python38-%{oname}
|
||||||
|
%doc CHANGELOG.rst COPYING README.rst
|
||||||
|
%{_bindir}/jsonschema
|
||||||
|
%{py38_puresitedir}/jsonschema/*.py*
|
||||||
|
%{py38_puresitedir}/jsonschema/tests/*.py*
|
||||||
|
%{py38_puresitedir}/jsonschema*.egg-info
|
||||||
|
%{py38_puresitedir}/jsonschema/schemas/draft*.json
|
||||||
|
|
||||||
|
%endif
|
||||||
#------------------------------------------------------------------
|
#------------------------------------------------------------------
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{oname}-%{version}
|
%setup -qn %{oname}-%{version}
|
||||||
echo "%{version}" > version.txt
|
#echo "'__version__ = '2.6.0'" > jsonschema/_version.py
|
||||||
|
sed -i -e '/setup_requires=/d' -e '/vcversioner=/d' setup.py
|
||||||
|
cp -a . %{py3dir}
|
||||||
|
cp -a . %{py38dir}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
#python setup.py build
|
|
||||||
#python3 setup.py build
|
|
||||||
%py_build
|
%py_build
|
||||||
|
|
||||||
|
pushd %{py3dir}
|
||||||
%py3_build
|
%py3_build
|
||||||
|
popd
|
||||||
|
|
||||||
|
%if %{py38}
|
||||||
|
pushd %{py38dir}
|
||||||
|
%py38_build
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
#python setup.py install --root=%{buildroot}
|
|
||||||
#python3 setup.py install --root=%{buildroot}
|
|
||||||
%py_install
|
%py_install
|
||||||
|
mv %{buildroot}%{_bindir}/jsonschema %{buildroot}%{_bindir}/jsonschema2
|
||||||
|
|
||||||
|
pushd %{py3dir}
|
||||||
%py3_install
|
%py3_install
|
||||||
|
mv %{buildroot}%{_bindir}/jsonschema %{buildroot}%{_bindir}/jsonschema3
|
||||||
|
popd
|
||||||
|
|
||||||
|
%if %{py38}
|
||||||
|
pushd %{py38dir}
|
||||||
|
%py38_install
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
#{_bindir}/nosetests-2* -v || :
|
#{_bindir}/nosetests-2* -v || :
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc CHANGELOG.rst COPYING README.rst
|
%doc CHANGELOG.rst COPYING README.rst
|
||||||
|
%{_bindir}/jsonschema2
|
||||||
%{py_puresitedir}/jsonschema/*.py*
|
%{py_puresitedir}/jsonschema/*.py*
|
||||||
%{py_puresitedir}/jsonschema/tests/*.py*
|
%{py_puresitedir}/jsonschema/tests/*.py*
|
||||||
%{py_puresitedir}/jsonschema*.egg-info
|
%{py_puresitedir}/jsonschema*.egg-info
|
||||||
|
|
Loading…
Add table
Reference in a new issue