]> git.pld-linux.org Git - packages/python-jsonschema.git/blame - python-jsonschema.spec
semi-automatic change: use py_build/py_install macros
[packages/python-jsonschema.git] / python-jsonschema.spec
CommitLineData
2b091471
ER
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module jsonschema
8Summary: An implementation of JSON Schema validation for Python
9Name: python-%{module}
10Version: 2.4.0
11Release: 1
12License: MIT
13Group: Libraries/Python
14Source0: http://pypi.python.org/packages/source/j/jsonschema/%{module}-%{version}.tar.gz
15# Source0-md5: 661f85c3d23094afbb9ac3c0673840bf
16URL: http://pypi.python.org/pypi/jsonschema
03800fb9 17BuildRequires: rpm-pythonprov
2b091471
ER
18%if %{with python2}
19BuildRequires: python-argparse
2b091471 20BuildRequires: python-mock
03800fb9 21BuildRequires: python-modules
2b091471 22BuildRequires: python-nose
03800fb9
ER
23BuildRequires: python-setuptools
24%endif
2b091471 25%if %{with python3}
2b091471 26BuildRequires: python3-nose
03800fb9 27BuildRequires: python3-setuptools
2b091471 28%endif
03800fb9 29BuildArch: noarch
2b091471
ER
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33jsonschema is JSON Schema validator currently based on
34<http://tools.ietf.org/html/draft-zyp-json-schema-03>.
35
36%package -n python3-%{module}
37Summary: An implementation of JSON Schema validation for Python
38Group: Libraries/Python
39
40%description -n python3-%{module}
41jsonschema is JSON Schema validator currently based on
42<http://tools.ietf.org/html/draft-zyp-json-schema-03>.
43
44%prep
45%setup -q -n %{module}-%{version}
46
2b091471
ER
47%build
48%if %{with python3}
ffbb9fa8 49%py3_build
2b091471 50%endif
ffbb9fa8 51%py_build
2b091471
ER
52
53%if %{with tests}
54%if %{with python3}
2b091471 55%{_bindir}/nosetests-%{py3_ver} -v
2b091471
ER
56%endif
57%{_bindir}/nosetests-%{py_ver} -v
58%endif
59
60%install
61rm -rf $RPM_BUILD_ROOT
62%if %{with python3}
ffbb9fa8 63%py3_install
2b091471
ER
64%endif
65
66%if %{with python2}
ffbb9fa8 67%py_install
2b091471
ER
68
69%py_postclean
70%endif
71
72%clean
73rm -rf $RPM_BUILD_ROOT
74
75%if %{with python2}
76%files
77%defattr(644,root,root,755)
78%doc README.rst COPYING
79%attr(755,root,root) %{_bindir}/jsonschema
80%{py_sitescriptdir}/%{module}
81%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
82%endif
83
84%if %{with python3}
85%files -n python3-%{module}
86%defattr(644,root,root,755)
87%doc README.rst COPYING
88%{py3_sitescriptdir}/%{module}
89%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
90%endif
This page took 1.984345 seconds and 4 git commands to generate.