]>
Commit | Line | Data |
---|---|---|
2860bf67 JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | %define module dictdiffer | |
7 | Summary: Dictdiffer is a library that helps you to diff and patch dictionaries | |
8 | Name: python-%{module} | |
9 | Version: 0.8.1 | |
599bafb0 | 10 | Release: 6 |
2860bf67 JP |
11 | License: MIT |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/dictdiffer/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/d/dictdiffer/%{module}-%{version}.tar.gz | |
15 | # Source0-md5: 3185fe683d976282bf6313de14b7c7e9 | |
16 | URL: https://github.com/inveniosoftware/dictdiffer | |
17 | %if %{with python2} | |
18 | BuildRequires: python-modules >= 1:2.7 | |
19 | BuildRequires: python-setuptools | |
20 | %endif | |
21 | %if %{with python3} | |
22 | BuildRequires: python3-modules >= 1:3.4 | |
23 | BuildRequires: python3-setuptools | |
24 | %endif | |
25 | BuildRequires: rpm-pythonprov | |
26 | BuildRequires: rpmbuild(macros) >= 1.714 | |
27 | Requires: python-modules >= 1:2.7 | |
28 | BuildArch: noarch | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | Dictdiffer is a helper module that helps you to diff and patch | |
33 | dictionaries. | |
34 | ||
35 | %package -n python3-%{module} | |
36 | Summary: Dictdiffer is a library that helps you to diff and patch dictionaries | |
37 | Group: Libraries/Python | |
38 | Requires: python3-modules >= 1:3.4 | |
39 | ||
40 | %description -n python3-%{module} | |
41 | Dictdiffer is a helper module that helps you to diff and patch | |
42 | dictionaries. | |
43 | ||
44 | %prep | |
45 | %setup -q -n %{module}-%{version} | |
46 | ||
47 | %build | |
48 | %if %{with python2} | |
49 | %py_build | |
50 | %endif | |
51 | ||
52 | %if %{with python3} | |
53 | %py3_build | |
54 | %endif | |
55 | ||
56 | %install | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %if %{with python2} | |
60 | %py_install | |
61 | ||
62 | %py_postclean | |
63 | %endif | |
64 | ||
65 | %if %{with python3} | |
66 | %py3_install | |
67 | %endif | |
68 | ||
69 | %clean | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %if %{with python2} | |
73 | %files | |
74 | %defattr(644,root,root,755) | |
75 | %doc AUTHORS CHANGES CONTRIBUTING.rst MAINTAINERS README.rst | |
76 | %{py_sitescriptdir}/%{module} | |
77 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
78 | %endif | |
79 | ||
80 | %if %{with python3} | |
81 | %files -n python3-%{module} | |
82 | %defattr(644,root,root,755) | |
83 | %doc AUTHORS CHANGES CONTRIBUTING.rst MAINTAINERS README.rst | |
84 | %{py3_sitescriptdir}/%{module} | |
85 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
86 | %endif |