]> git.pld-linux.org Git - packages/python-jsonpatch.git/blame - python-jsonpatch.spec
rebuild with python 3.10
[packages/python-jsonpatch.git] / python-jsonpatch.spec
CommitLineData
adb95e6d
JK
1#
2# Conditional build:
3%bcond_with tests # do perform "make test" (broken - tests.js file missing)
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Apply JSON-Patches (RFC 6902)
8Name: python-jsonpatch
9Version: 1.16
a4cf4b76 10Release: 5
adb95e6d
JK
11License: BSD
12Group: Libraries/Python
13Source0: https://files.pythonhosted.org/packages/source/j/jsonpatch/jsonpatch-%{version}.tar.gz
14# Source0-md5: 8ef1ceb00dcf992c9e43611f698f9279
15URL: https://pypi.python.org/pypi/jsonpatch
16BuildRequires: rpm-pythonprov
17BuildRequires: rpmbuild(macros) >= 1.714
18%if %{with python2}
19BuildRequires: python-setuptools
20%if %{with tests}
21BuildRequires: python-jsonpointer >= 1.9
22%endif
23%endif
24%if %{with python3}
25BuildRequires: python3-setuptools
26%if %{with tests}
27BuildRequires: python3-jsonpointer >= 1.9
28%endif
29%endif
30Requires: python-jsonpointer >= 1.9
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35Library to apply JSON Patches according to RFC 6902.
36
37%package -n python3-jsonpatch
38Summary: Apply JSON-Patches (RFC 6902)
39Group: Libraries/Python
40Requires: python3-jsonpointer >= 1.9
41
42%description -n python3-jsonpatch
43Library to apply JSON Patches according to RFC 6902.
44
45%package -n jsonpatch
46Summary: Apply JSON-Patches (RFC 6902)
47Group: Libraries/Python
48%if %{with python3}
49Requires: python3-jsonpatch = %{version}-%{release}
50%else
51Requires: %{name} = %{version}-%{release}
52%endif
53
54%description -n jsonpatch
55Library to apply JSON Patches according to RFC 6902.
56
57
58%prep
59%setup -q -n jsonpatch-%{version}
60
61%build
62%if %{with python2}
63%py_build %{?with_tests:test}
64%endif
65
66%if %{with python3}
67%py3_build %{?with_tests:test}
68%endif
69
70%install
71rm -rf $RPM_BUILD_ROOT
72
73%if %{with python2}
74%py_install
75
76%py_postclean
77%endif
78
79%if %{with python3}
80# otherwise python2 scripts would be used
81rm -f $RPM_BUILD_ROOT%{_bindir}/* || :
82
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 AUTHORS README.md
93%{py_sitescriptdir}/jsonpatch.py[co]
94%{py_sitescriptdir}/jsonpatch-%{version}-py*.egg-info
95%endif
96
97%if %{with python3}
98%files -n python3-jsonpatch
99%defattr(644,root,root,755)
100%doc AUTHORS README.md
101%{py3_sitescriptdir}/jsonpatch.py
102%{py3_sitescriptdir}/__pycache__/*
103%{py3_sitescriptdir}/jsonpatch-%{version}-py*.egg-info
104%endif
105
106%files -n jsonpatch
107%defattr(644,root,root,755)
108%doc AUTHORS README.md
109%attr(755,root,root) %{_bindir}/jsonpatch
110%attr(755,root,root) %{_bindir}/jsondiff
This page took 0.07892 seconds and 4 git commands to generate.