1 # This is an unofficial package of the Python versions for PyPI
2 # https://bitbucket.org/spookylukey/diff-match-patch for packaging issues.
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module diff_match_patch
9 Summary: The Diff Match and Patch libraries
10 Name: python-%{module}
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
21 BuildRequires: python-modules
22 BuildRequires: python-setuptools
25 BuildRequires: python3-devel
26 BuildRequires: python3-setuptools
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 The Diff Match and Patch libraries offer robust algorithms to perform
33 the operations required for synchronizing plain text.
35 %package -n python3-%{module}
36 Summary: The Diff Match and Patch libraries
37 Group: Libraries/Python
38 Requires: python3-modules
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.
45 %setup -q -n diff-match-patch-%{version}
47 # Remove bundled egg-info
48 %{__rm} -r python2/diff_match_patch.egg-info
60 rm -rf $RPM_BUILD_ROOT
71 rm -rf $RPM_BUILD_ROOT
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
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