From 50f85cbec5c759fc16d8c109d44554c6703a4282 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 15 May 2016 10:33:56 +0200 Subject: [PATCH] - updated to 2.5.1 - pl --- python-jsonschema.spec | 69 +++++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 18 deletions(-) diff --git a/python-jsonschema.spec b/python-jsonschema.spec index 66c7554..84d5d67 100644 --- a/python-jsonschema.spec +++ b/python-jsonschema.spec @@ -1,29 +1,38 @@ # # Conditional build: -%bcond_without tests # do not perform "make test" +%bcond_without tests # nose tests %bcond_without python2 # CPython 2.x module %bcond_without python3 # CPython 3.x module %define module jsonschema -Summary: An implementation of JSON Schema validation for Python +Summary: An implementation of JSON Schema validation for Python 2 +Summary(pl.UTF-8): Implementacja sprawdzania poprawności schematu JSON dla Pythona 2 Name: python-%{module} -Version: 2.4.0 +Version: 2.5.1 Release: 1 License: MIT Group: Libraries/Python -Source0: http://pypi.python.org/packages/source/j/jsonschema/%{module}-%{version}.tar.gz -# Source0-md5: 661f85c3d23094afbb9ac3c0673840bf -URL: http://pypi.python.org/pypi/jsonschema +#Source0Download: https://pypi.python.org/simple/jsonschema/ +Source0: https://pypi.python.org/packages/source/j/jsonschema/%{module}-%{version}.tar.gz +# Source0-md5: 374e848fdb69a3ce8b7e778b47c30640 +URL: https://pypi.python.org/pypi/jsonschema BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.710 %if %{with python2} +%if "%{py_ver}" < "2.7" BuildRequires: python-argparse +BuildRequires: python-repoze.lru +%endif +%if "%{py_ver}" >= "2.7" +BuildRequires: python-functools32 +%endif BuildRequires: python-mock -BuildRequires: python-modules +BuildRequires: python-modules >= 1:2.6 BuildRequires: python-nose BuildRequires: python-setuptools %endif %if %{with python3} +BuildRequires: python3-modules >= 1:3.4 BuildRequires: python3-nose BuildRequires: python3-setuptools %endif @@ -34,40 +43,62 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) jsonschema is JSON Schema validator currently based on . +%description -l pl.UTF-8 +jsonschema to walidator schematów JSON oparty na dokumencie +. + %package -n python3-%{module} -Summary: An implementation of JSON Schema validation for Python +Summary: An implementation of JSON Schema validation for Python 3 +Summary(pl.UTF-8): Implementacja sprawdzania poprawności schematu JSON dla Pythona 3 Group: Libraries/Python %description -n python3-%{module} jsonschema is JSON Schema validator currently based on . +%description -n python3-%{module} -l pl.UTF-8 +jsonschema to walidator schematów JSON oparty na dokumencie +. + %prep %setup -q -n %{module}-%{version} %build +%if %{with pythno2} +%py_build + +%{_bindir}/nosetests-%{py_ver} -v +%endif + %if %{with python3} %py3_build -%endif -%py_build %if %{with tests} -%if %{with python3} %{_bindir}/nosetests-%{py3_ver} -v %endif -%{_bindir}/nosetests-%{py_ver} -v %endif %install rm -rf $RPM_BUILD_ROOT + %if %{with python3} %py3_install + +%{__mv} $RPM_BUILD_ROOT%{_bindir}/jsonschema{,-3} + +# pythonegg dependency generator resolves conditionals for requires() based on +# python version that runs the generator, not the version egg is targeted; +# avoid generation of python3egg(functools32) dependency for python 3 +%{__sed} -i -e "/^\\[:python_version=='2.[67]']/,/^$/d" $RPM_BUILD_ROOT%{py3_sitescriptdir}/jsonschema-%{version}-py*.egg-info/requires.txt %endif %if %{with python2} %py_install %py_postclean + +%{__mv} $RPM_BUILD_ROOT%{_bindir}/jsonschema{,-2} +ln -sf jsonschema-2 $RPM_BUILD_ROOT%{_bindir}/jsonschema %endif %clean @@ -76,16 +107,18 @@ rm -rf $RPM_BUILD_ROOT %if %{with python2} %files %defattr(644,root,root,755) -%doc README.rst COPYING +%doc CHANGELOG.rst COPYING README.rst %attr(755,root,root) %{_bindir}/jsonschema -%{py_sitescriptdir}/%{module} -%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info +%attr(755,root,root) %{_bindir}/jsonschema-2 +%{py_sitescriptdir}/jsonschema +%{py_sitescriptdir}/jsonschema-%{version}-py*.egg-info %endif %if %{with python3} %files -n python3-%{module} %defattr(644,root,root,755) -%doc README.rst COPYING -%{py3_sitescriptdir}/%{module} -%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info +%doc CHANGELOG.rst COPYING README.rst +%attr(755,root,root) %{_bindir}/jsonschema-3 +%{py3_sitescriptdir}/jsonschema +%{py3_sitescriptdir}/jsonschema-%{version}-py*.egg-info %endif -- 2.44.0