3 %bcond_with tests # do perform "make test" (test/schemas files are missing)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Python object model built on JSON schema and JSON patch
12 Group: Libraries/Python
13 Source0: https://files.pythonhosted.org/packages/source/w/warlock/warlock-%{version}.tar.gz
14 # Source0-md5: 746aba989d97762948e5fca6601f283f
15 URL: https://pypi.python.org/pypi/warlock
16 BuildRequires: rpm-pythonprov
17 BuildRequires: rpmbuild(macros) >= 1.714
19 BuildRequires: python-setuptools
21 BuildRequires: python-jsonpatch >= 0.10
22 BuildRequires: python-jsonschema >= 0.7
23 BuildRequires: python-six
27 BuildRequires: python3-setuptools
29 BuildRequires: python3-jsonpatch >= 0.10
30 BuildRequires: python3-jsonschema >= 0.7
31 BuildRequires: python3-six
34 Requires: python-jsonpatch >= 0.10
35 Requires: python-jsonschema >= 0.7
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 Build self-validating python objects using JSON schemas.
43 %package -n python3-warlock
44 Summary: Python object model built on JSON schema and JSON patch
45 Group: Libraries/Python
46 Requires: python3-jsonpatch >= 0.10
47 Requires: python3-jsonschema >= 0.7
50 %description -n python3-warlock
51 Build self-validating python objects using JSON schemas.
54 %setup -q -n warlock-%{version}
61 PYTHONPATH=build-2/lib %{__python} -m unittest discover -t test test_core
69 PYTHONPATH=build-2/lib %{__python} -m unittest discover -t test test_core
74 rm -rf $RPM_BUILD_ROOT
87 rm -rf $RPM_BUILD_ROOT
91 %defattr(644,root,root,755)
93 %{py_sitescriptdir}/warlock
94 %{py_sitescriptdir}/warlock-%{version}-py*.egg-info
98 %files -n python3-warlock
99 %defattr(644,root,root,755)
101 %{py3_sitescriptdir}/warlock
102 %{py3_sitescriptdir}/warlock-%{version}-py*.egg-info