]> git.pld-linux.org Git - SPECS.git/blob - python-jsondiff.spec
SPECS updated Sat 31 Jul 21:27:02 CEST 2021
[SPECS.git] / python-jsondiff.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Diff JSON and JSON-like structures in Python
8 Summary(pl.UTF-8):      Porównywanie JSON-a i struktur w stylu JSON-a w Pythonie
9 Name:           python-jsondiff
10 Version:        1.2.0
11 Release:        2
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/jsondiff/
15 Source0:        https://files.pythonhosted.org/packages/source/j/jsondiff/jsondiff-%{version}.tar.gz
16 # Source0-md5:  d48297d9253356b7f71e38268e7e0d10
17 URL:            https://pypi.org/project/jsondiff/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.7
20 BuildRequires:  python-setuptools
21 %if %{with tests}
22 BuildRequires:  python-nose_random
23 %endif
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules >= 1:3.2
27 BuildRequires:  python3-setuptools
28 %if %{with tests}
29 BuildRequires:  python3-nose_random
30 %endif
31 %endif
32 BuildRequires:  rpm-pythonprov
33 BuildRequires:  rpmbuild(macros) >= 1.714
34 Requires:       python-modules >= 1:2.7
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 Diff JSON and JSON-like structures in Python.
40
41 %description -l pl.UTF-8
42 Porównywanie JSON-a i struktur w stylu JSON-a w Pythonie.
43
44 %package -n python3-jsondiff
45 Summary:        Diff JSON and JSON-like structures in Python
46 Summary(pl.UTF-8):      Porównywanie JSON-a i struktur w stylu JSON-a w Pythonie
47 Group:          Libraries/Python
48 Requires:       python3-modules >= 1:3.2
49
50 %description -n python3-jsondiff
51 Diff JSON and JSON-like structures in Python.
52
53 %description -n python3-jsondiff -l pl.UTF-8
54 Porównywanie JSON-a i struktur w stylu JSON-a w Pythonie.
55
56 %prep
57 %setup -q -n jsondiff-%{version}
58
59 %build
60 %if %{with python2}
61 %py_build
62
63 %if %{with tests}
64 %{__python} -m unittest tests
65 %endif
66 %endif
67
68 %if %{with python3}
69 %py3_build
70
71 %if %{with tests}
72 %{__python3} -m unittest tests
73 %endif
74 %endif
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 %if %{with python2}
80 %py_install
81
82 for bin in jdiff jsondiff ; do
83         %{__mv} $RPM_BUILD_ROOT%{_bindir}/${bin} $RPM_BUILD_ROOT%{_bindir}/${bin}-2
84 done
85
86 %py_postclean
87 %endif
88
89 %if %{with python3}
90 %py3_install
91
92 for bin in jdiff jsondiff ; do
93         %{__mv} $RPM_BUILD_ROOT%{_bindir}/${bin} $RPM_BUILD_ROOT%{_bindir}/${bin}-3
94         ln -sf ${bin}-3 $RPM_BUILD_ROOT%{_bindir}/${bin}
95 done
96 %endif
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %if %{with python2}
102 %files
103 %defattr(644,root,root,755)
104 %doc LICENSE README.rst
105 %attr(755,root,root) %{_bindir}/jdiff-2
106 %attr(755,root,root) %{_bindir}/jsondiff-2
107 %{py_sitescriptdir}/jsondiff
108 %{py_sitescriptdir}/jsondiff-%{version}-py*.egg-info
109 %endif
110
111 %if %{with python3}
112 %files -n python3-jsondiff
113 %defattr(644,root,root,755)
114 %doc LICENSE README.rst
115 %attr(755,root,root) %{_bindir}/jdiff
116 %attr(755,root,root) %{_bindir}/jdiff-3
117 %attr(755,root,root) %{_bindir}/jsondiff
118 %attr(755,root,root) %{_bindir}/jsondiff-3
119 %{py3_sitescriptdir}/jsondiff
120 %{py3_sitescriptdir}/jsondiff-%{version}-py*.egg-info
121 %endif
This page took 0.119132 seconds and 3 git commands to generate.