[packages/python-jsonschema] new, version 2.4.0

glen glen at pld-linux.org
Sat May 23 13:36:53 CEST 2015


commit 2b091471e3de36cf10fe98c58081bdf86ff6420f
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat May 23 14:36:16 2015 +0300

    new, version 2.4.0
    
    based on fedora package 69c2281

 python-jsonschema.spec | 105 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 105 insertions(+)
---
diff --git a/python-jsonschema.spec b/python-jsonschema.spec
new file mode 100644
index 0000000..2a8f0aa
--- /dev/null
+++ b/python-jsonschema.spec
@@ -0,0 +1,105 @@
+#
+# Conditional build:
+%bcond_without	tests	# do not perform "make test"
+%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
+Name:		python-%{module}
+Version:	2.4.0
+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
+BuildArch:	noarch
+%if %{with python2}
+BuildRequires:	python-argparse
+BuildRequires:	python-modules
+%endif
+BuildRequires:	python-devel
+BuildRequires:	python-mock
+BuildRequires:	python-nose
+%if %{with python3}
+BuildRequires:	python3-devel
+BuildRequires:	python3-mock
+BuildRequires:	python3-nose
+%endif
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+jsonschema is JSON Schema validator currently based on
+<http://tools.ietf.org/html/draft-zyp-json-schema-03>.
+
+%package -n python3-%{module}
+Summary:	An implementation of JSON Schema validation for Python
+Group:		Libraries/Python
+
+%description -n python3-%{module}
+jsonschema is JSON Schema validator currently based on
+<http://tools.ietf.org/html/draft-zyp-json-schema-03>.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+set -- *
+install -d py3
+cp -a "$@" py3
+find py3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+
+%build
+%if %{with python3}
+cd py3
+	%{__python3} setup.py build
+cd ..
+%endif
+%{__python} setup.py build
+
+%if %{with tests}
+%if %{with python3}
+cd py3
+%{_bindir}/nosetests-%{py3_ver} -v
+cd ..
+%endif
+%{_bindir}/nosetests-%{py_ver} -v
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%if %{with python3}
+cd py3
+%{__python3} setup.py install --skip-build \
+	--optimize=2 \
+	--root=$RPM_BUILD_ROOT
+cd ..
+%endif
+
+%if %{with python2}
+%{__python} setup.py install --skip-build \
+	--optimize=2 \
+	--root=$RPM_BUILD_ROOT
+
+%py_postclean
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc README.rst COPYING
+%attr(755,root,root) %{_bindir}/jsonschema
+%{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/%{module}-%{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
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-jsonschema.git/commitdiff/2b091471e3de36cf10fe98c58081bdf86ff6420f



More information about the pld-cvs-commit mailing list