]>
Commit | Line | Data |
---|---|---|
3f6e30a3 ER |
1 | # This is an unofficial package of the Python versions for PyPI |
2 | # https://bitbucket.org/spookylukey/diff-match-patch for packaging issues. | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_without python2 # CPython 2.x module | |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | %define module diff_match_patch | |
9 | Summary: The Diff Match and Patch libraries | |
10 | Name: python-%{module} | |
11 | Version: 20121119 | |
92b15bd4 | 12 | Release: 6 |
3f6e30a3 ER |
13 | License: ASL |
14 | Group: Libraries/Python | |
15 | Source0: https://pypi.python.org/packages/22/82/46eaeab04805b4fac17630b59f30c4f2c8860988bcefd730ff4f1992908b/diff-match-patch-%{version}.tar.gz | |
16 | # Source0-md5: 08e02cad82dda942b09ee248772fe143 | |
17 | URL: https://code.google.com/p/google-diff-match-patch/ | |
18 | BuildRequires: rpm-pythonprov | |
19 | BuildRequires: rpmbuild(macros) >= 1.714 | |
20 | %if %{with python2} | |
21 | BuildRequires: python-modules | |
22 | BuildRequires: python-setuptools | |
23 | %endif | |
24 | %if %{with python3} | |
25 | BuildRequires: python3-devel | |
26 | BuildRequires: python3-setuptools | |
27 | %endif | |
28 | BuildArch: noarch | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | The Diff Match and Patch libraries offer robust algorithms to perform | |
33 | the operations required for synchronizing plain text. | |
34 | ||
35 | %package -n python3-%{module} | |
36 | Summary: The Diff Match and Patch libraries | |
37 | Group: Libraries/Python | |
38 | Requires: python3-modules | |
39 | ||
40 | %description -n python3-%{module} | |
41 | The Diff Match and Patch libraries offer robust algorithms to perform | |
42 | the operations required for synchronizing plain text. | |
43 | ||
44 | %prep | |
45 | %setup -q -n diff-match-patch-%{version} | |
46 | ||
47 | # Remove bundled egg-info | |
48 | %{__rm} -r python2/diff_match_patch.egg-info | |
49 | ||
50 | %build | |
51 | %if %{with python2} | |
52 | %py_build | |
53 | %endif | |
54 | ||
55 | %if %{with python3} | |
56 | %py3_build | |
57 | %endif | |
58 | ||
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | %if %{with python2} | |
62 | %py_install | |
63 | %py_postclean | |
64 | %endif | |
65 | ||
66 | %if %{with python3} | |
67 | %py3_install | |
68 | %endif | |
69 | ||
70 | %clean | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %if %{with python3} | |
74 | %files | |
75 | %defattr(644,root,root,755) | |
76 | %doc README.original.txt README.rst | |
77 | %{py_sitescriptdir}/%{module} | |
78 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
79 | %endif | |
80 | ||
81 | %if %{with python3} | |
82 | %files -n python3-%{module} | |
83 | %defattr(644,root,root,755) | |
84 | %doc README.original.txt README.rst | |
85 | %{py3_sitescriptdir}/%{module} | |
86 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
87 | %endif |