]> git.pld-linux.org Git - packages/python-warlock.git/blame - python-warlock.spec
rebuild with tests and docs
[packages/python-warlock.git] / python-warlock.spec
CommitLineData
fbcebad6
JK
1#
2# Conditional build:
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
6
7Summary: Python object model built on JSON schema and JSON patch
8Name: python-warlock
d26bcda9 9Version: 1.3.3
b67b81fa 10Release: 6
fbcebad6
JK
11License: Apache v2.0
12Group: Libraries/Python
13Source0: https://files.pythonhosted.org/packages/source/w/warlock/warlock-%{version}.tar.gz
d26bcda9 14# Source0-md5: 746aba989d97762948e5fca6601f283f
fbcebad6
JK
15URL: https://pypi.python.org/pypi/warlock
16BuildRequires: rpm-pythonprov
17BuildRequires: rpmbuild(macros) >= 1.714
18%if %{with python2}
19BuildRequires: python-setuptools
20%if %{with tests}
21BuildRequires: python-jsonpatch >= 0.10
22BuildRequires: python-jsonschema >= 0.7
23BuildRequires: python-six
24%endif
25%endif
26%if %{with python3}
27BuildRequires: python3-setuptools
28%if %{with tests}
29BuildRequires: python3-jsonpatch >= 0.10
30BuildRequires: python3-jsonschema >= 0.7
31BuildRequires: python3-six
32%endif
33%endif
34Requires: python-jsonpatch >= 0.10
35Requires: python-jsonschema >= 0.7
36Requires: python-six
37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41Build self-validating python objects using JSON schemas.
42
43%package -n python3-warlock
44Summary: Python object model built on JSON schema and JSON patch
45Group: Libraries/Python
46Requires: python3-jsonpatch >= 0.10
47Requires: python3-jsonschema >= 0.7
48Requires: python3-six
49
50%description -n python3-warlock
51Build self-validating python objects using JSON schemas.
52
53%prep
54%setup -q -n warlock-%{version}
55
56%build
57%if %{with python2}
58%py_build
59
60%if %{with tests}
61PYTHONPATH=build-2/lib %{__python} -m unittest discover -t test test_core
62%endif
63%endif
64
65%if %{with python3}
66%py3_build
67
68%if %{with tests}
69PYTHONPATH=build-2/lib %{__python} -m unittest discover -t test test_core
70%endif
71%endif
72
73%install
74rm -rf $RPM_BUILD_ROOT
75
76%if %{with python2}
77%py_install
78
79%py_postclean
80%endif
81
82%if %{with python3}
83%py3_install
84%endif
85
86%clean
87rm -rf $RPM_BUILD_ROOT
88
89%if %{with python2}
90%files
91%defattr(644,root,root,755)
92%doc README.md
93%{py_sitescriptdir}/warlock
94%{py_sitescriptdir}/warlock-%{version}-py*.egg-info
95%endif
96
97%if %{with python3}
98%files -n python3-warlock
99%defattr(644,root,root,755)
100%doc README.md
101%{py3_sitescriptdir}/warlock
102%{py3_sitescriptdir}/warlock-%{version}-py*.egg-info
103%endif
104
This page took 0.136754 seconds and 4 git commands to generate.