summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <copr-devel@lists.fedorahosted.org>2023-02-24 07:09:46 +0000
committerCoprDistGit <copr-devel@lists.fedorahosted.org>2023-02-24 07:09:46 +0000
commiteac84185ee470860e889199fe003e06ee64210bf (patch)
treece6b83774c1e436484c46dd39c6d923d031d048b
parentb80fbb0529e7eaf55b77943afae54b0071dc0ba6 (diff)
automatic import of python3-diff-match-patchopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-diff-match-patch.spec329
-rw-r--r--sources1
3 files changed, 331 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..6c100f6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/diff-match-patch-20200713.tar.gz
diff --git a/python-diff-match-patch.spec b/python-diff-match-patch.spec
new file mode 100644
index 0000000..2ac3a2e
--- /dev/null
+++ b/python-diff-match-patch.spec
@@ -0,0 +1,329 @@
+%global _empty_manifest_terminate_build 0
+Name: python-diff-match-patch
+Version: 20200713
+Release: 1
+Summary: Repackaging of Google's Diff Match and Patch libraries. Offers robust algorithms to perform the operations required for synchronizing plain text.
+License: Apache
+URL: https://github.com/diff-match-patch-python/diff-match-patch
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f0/1e/48ba888757d3f63ff35536e3e73e05c8a20d701e2b4fcbe4b17c29a2408d/diff-match-patch-20200713.tar.gz
+BuildArch: noarch
+
+
+%description
+# diff-match-patch
+
+Google's [Diff Match and Patch][DMP] library, packaged for modern Python.
+
+[![build status](https://travis-ci.org/diff-match-patch-python/diff-match-patch.svg?branch=master)](https://travis-ci.org/diff-match-patch-python/diff-match-patch)
+[![version](https://img.shields.io/pypi/v/diff-match-patch.svg)](https://pypi.org/project/diff-match-patch)
+[![license](https://img.shields.io/pypi/l/diff-match-patch.svg)](https://github.com/diff-match-patch-python/diff-match-patch/blob/master/LICENSE)
+
+## Install
+
+diff-match-patch is supported on Python 2.7 or Python 3.4 or newer.
+You can install it from PyPI:
+
+```shell
+python -m pip install diff-match-patch
+```
+
+## Usage
+
+Generating a patchset (analogous to unified diff) between two texts:
+
+```python
+from diff_match_patch import diff_match_patch
+
+dmp = diff_match_patch()
+patches = dmp.patch_make(text1, text2)
+diff = dmp.patch_toText(patches)
+```
+
+Applying a patchset to a text can then be done with:
+
+```python
+from diff_match_patch import diff_match_patch
+
+dmp = diff_match_patch()
+patches = dmp.patch_fromText(diff)
+new_text, _ = dmp.patch_apply(patches, text)
+```
+
+## Original README
+The Diff Match and Patch libraries offer robust algorithms to perform the
+operations required for synchronizing plain text.
+
+1. Diff:
+ * Compare two blocks of plain text and efficiently return a list of differences.
+ * [Diff Demo](https://neil.fraser.name/software/diff_match_patch/demos/diff.html)
+2. Match:
+ * Given a search string, find its best fuzzy match in a block of plain text. Weighted for both accuracy and location.
+ * [Match Demo](https://neil.fraser.name/software/diff_match_patch/demos/match.html)
+3. Patch:
+ * Apply a list of patches onto plain text. Use best-effort to apply patch even when the underlying text doesn't match.
+ * [Patch Demo](https://neil.fraser.name/software/diff_match_patch/demos/patch.html)
+
+Originally built in 2006 to power Google Docs, this library is now available in C++, C#, Dart, Java, JavaScript, Lua, Objective C, and Python.
+
+### Reference
+
+* [API](https://github.com/google/diff-match-patch/wiki/API) - Common API across all languages.
+* [Line or Word Diffs](https://github.com/google/diff-match-patch/wiki/Line-or-Word-Diffs) - Less detailed diffs.
+* [Plain Text vs. Structured Content](https://github.com/google/diff-match-patch/wiki/Plain-Text-vs.-Structured-Content) - How to deal with data like XML.
+* [Unidiff](https://github.com/google/diff-match-patch/wiki/Unidiff) - The patch serialization format.
+* [Support](https://groups.google.com/forum/#!forum/diff-match-patch) - Newsgroup for developers.
+
+### Languages
+Although each language port of Diff Match Patch uses the same API, there are some language-specific notes.
+
+* [C++](https://github.com/google/diff-match-patch/wiki/Language:-Cpp)
+* [C#](https://github.com/google/diff-match-patch/wiki/Language:-C%23)
+* [Dart](https://github.com/google/diff-match-patch/wiki/Language:-Dart)
+* [Java](https://github.com/google/diff-match-patch/wiki/Language:-Java)
+* [JavaScript](https://github.com/google/diff-match-patch/wiki/Language:-JavaScript)
+* [Lua](https://github.com/google/diff-match-patch/wiki/Language:-Lua)
+* [Objective-C](https://github.com/google/diff-match-patch/wiki/Language:-Objective-C)
+* [Python](https://github.com/google/diff-match-patch/wiki/Language:-Python)
+
+A standardized speed test tracks the [relative performance of diffs](https://docs.google.com/spreadsheets/d/1zpZccuBpjMZTvL1nGDMKJc7rWL_m_drF4XKOJvB27Kc/edit#gid=0) in each language.
+
+### Algorithms
+This library implements [Myer's diff algorithm](https://neil.fraser.name/writing/diff/myers.pdf) which is generally considered to be the best general-purpose diff. A layer of [pre-diff speedups and post-diff cleanups](https://neil.fraser.name/writing/diff/) surround the diff algorithm, improving both performance and output quality.
+
+This library also implements a [Bitap matching algorithm](https://neil.fraser.name/writing/patch/bitap.ps) at the heart of a [flexible matching and patching strategy](https://neil.fraser.name/writing/patch/).
+
+[DMP]: https://github.com/google/diff-match-patch
+[API]: https://github.com/google/diff-match-patch/wiki/API
+
+
+
+
+%package -n python3-diff-match-patch
+Summary: Repackaging of Google's Diff Match and Patch libraries. Offers robust algorithms to perform the operations required for synchronizing plain text.
+Provides: python-diff-match-patch
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+%description -n python3-diff-match-patch
+# diff-match-patch
+
+Google's [Diff Match and Patch][DMP] library, packaged for modern Python.
+
+[![build status](https://travis-ci.org/diff-match-patch-python/diff-match-patch.svg?branch=master)](https://travis-ci.org/diff-match-patch-python/diff-match-patch)
+[![version](https://img.shields.io/pypi/v/diff-match-patch.svg)](https://pypi.org/project/diff-match-patch)
+[![license](https://img.shields.io/pypi/l/diff-match-patch.svg)](https://github.com/diff-match-patch-python/diff-match-patch/blob/master/LICENSE)
+
+## Install
+
+diff-match-patch is supported on Python 2.7 or Python 3.4 or newer.
+You can install it from PyPI:
+
+```shell
+python -m pip install diff-match-patch
+```
+
+## Usage
+
+Generating a patchset (analogous to unified diff) between two texts:
+
+```python
+from diff_match_patch import diff_match_patch
+
+dmp = diff_match_patch()
+patches = dmp.patch_make(text1, text2)
+diff = dmp.patch_toText(patches)
+```
+
+Applying a patchset to a text can then be done with:
+
+```python
+from diff_match_patch import diff_match_patch
+
+dmp = diff_match_patch()
+patches = dmp.patch_fromText(diff)
+new_text, _ = dmp.patch_apply(patches, text)
+```
+
+## Original README
+The Diff Match and Patch libraries offer robust algorithms to perform the
+operations required for synchronizing plain text.
+
+1. Diff:
+ * Compare two blocks of plain text and efficiently return a list of differences.
+ * [Diff Demo](https://neil.fraser.name/software/diff_match_patch/demos/diff.html)
+2. Match:
+ * Given a search string, find its best fuzzy match in a block of plain text. Weighted for both accuracy and location.
+ * [Match Demo](https://neil.fraser.name/software/diff_match_patch/demos/match.html)
+3. Patch:
+ * Apply a list of patches onto plain text. Use best-effort to apply patch even when the underlying text doesn't match.
+ * [Patch Demo](https://neil.fraser.name/software/diff_match_patch/demos/patch.html)
+
+Originally built in 2006 to power Google Docs, this library is now available in C++, C#, Dart, Java, JavaScript, Lua, Objective C, and Python.
+
+### Reference
+
+* [API](https://github.com/google/diff-match-patch/wiki/API) - Common API across all languages.
+* [Line or Word Diffs](https://github.com/google/diff-match-patch/wiki/Line-or-Word-Diffs) - Less detailed diffs.
+* [Plain Text vs. Structured Content](https://github.com/google/diff-match-patch/wiki/Plain-Text-vs.-Structured-Content) - How to deal with data like XML.
+* [Unidiff](https://github.com/google/diff-match-patch/wiki/Unidiff) - The patch serialization format.
+* [Support](https://groups.google.com/forum/#!forum/diff-match-patch) - Newsgroup for developers.
+
+### Languages
+Although each language port of Diff Match Patch uses the same API, there are some language-specific notes.
+
+* [C++](https://github.com/google/diff-match-patch/wiki/Language:-Cpp)
+* [C#](https://github.com/google/diff-match-patch/wiki/Language:-C%23)
+* [Dart](https://github.com/google/diff-match-patch/wiki/Language:-Dart)
+* [Java](https://github.com/google/diff-match-patch/wiki/Language:-Java)
+* [JavaScript](https://github.com/google/diff-match-patch/wiki/Language:-JavaScript)
+* [Lua](https://github.com/google/diff-match-patch/wiki/Language:-Lua)
+* [Objective-C](https://github.com/google/diff-match-patch/wiki/Language:-Objective-C)
+* [Python](https://github.com/google/diff-match-patch/wiki/Language:-Python)
+
+A standardized speed test tracks the [relative performance of diffs](https://docs.google.com/spreadsheets/d/1zpZccuBpjMZTvL1nGDMKJc7rWL_m_drF4XKOJvB27Kc/edit#gid=0) in each language.
+
+### Algorithms
+This library implements [Myer's diff algorithm](https://neil.fraser.name/writing/diff/myers.pdf) which is generally considered to be the best general-purpose diff. A layer of [pre-diff speedups and post-diff cleanups](https://neil.fraser.name/writing/diff/) surround the diff algorithm, improving both performance and output quality.
+
+This library also implements a [Bitap matching algorithm](https://neil.fraser.name/writing/patch/bitap.ps) at the heart of a [flexible matching and patching strategy](https://neil.fraser.name/writing/patch/).
+
+[DMP]: https://github.com/google/diff-match-patch
+[API]: https://github.com/google/diff-match-patch/wiki/API
+
+
+
+
+%package help
+Summary: Development documents and examples for diff-match-patch
+Provides: python3-diff-match-patch-doc
+%description help
+# diff-match-patch
+
+Google's [Diff Match and Patch][DMP] library, packaged for modern Python.
+
+[![build status](https://travis-ci.org/diff-match-patch-python/diff-match-patch.svg?branch=master)](https://travis-ci.org/diff-match-patch-python/diff-match-patch)
+[![version](https://img.shields.io/pypi/v/diff-match-patch.svg)](https://pypi.org/project/diff-match-patch)
+[![license](https://img.shields.io/pypi/l/diff-match-patch.svg)](https://github.com/diff-match-patch-python/diff-match-patch/blob/master/LICENSE)
+
+## Install
+
+diff-match-patch is supported on Python 2.7 or Python 3.4 or newer.
+You can install it from PyPI:
+
+```shell
+python -m pip install diff-match-patch
+```
+
+## Usage
+
+Generating a patchset (analogous to unified diff) between two texts:
+
+```python
+from diff_match_patch import diff_match_patch
+
+dmp = diff_match_patch()
+patches = dmp.patch_make(text1, text2)
+diff = dmp.patch_toText(patches)
+```
+
+Applying a patchset to a text can then be done with:
+
+```python
+from diff_match_patch import diff_match_patch
+
+dmp = diff_match_patch()
+patches = dmp.patch_fromText(diff)
+new_text, _ = dmp.patch_apply(patches, text)
+```
+
+## Original README
+The Diff Match and Patch libraries offer robust algorithms to perform the
+operations required for synchronizing plain text.
+
+1. Diff:
+ * Compare two blocks of plain text and efficiently return a list of differences.
+ * [Diff Demo](https://neil.fraser.name/software/diff_match_patch/demos/diff.html)
+2. Match:
+ * Given a search string, find its best fuzzy match in a block of plain text. Weighted for both accuracy and location.
+ * [Match Demo](https://neil.fraser.name/software/diff_match_patch/demos/match.html)
+3. Patch:
+ * Apply a list of patches onto plain text. Use best-effort to apply patch even when the underlying text doesn't match.
+ * [Patch Demo](https://neil.fraser.name/software/diff_match_patch/demos/patch.html)
+
+Originally built in 2006 to power Google Docs, this library is now available in C++, C#, Dart, Java, JavaScript, Lua, Objective C, and Python.
+
+### Reference
+
+* [API](https://github.com/google/diff-match-patch/wiki/API) - Common API across all languages.
+* [Line or Word Diffs](https://github.com/google/diff-match-patch/wiki/Line-or-Word-Diffs) - Less detailed diffs.
+* [Plain Text vs. Structured Content](https://github.com/google/diff-match-patch/wiki/Plain-Text-vs.-Structured-Content) - How to deal with data like XML.
+* [Unidiff](https://github.com/google/diff-match-patch/wiki/Unidiff) - The patch serialization format.
+* [Support](https://groups.google.com/forum/#!forum/diff-match-patch) - Newsgroup for developers.
+
+### Languages
+Although each language port of Diff Match Patch uses the same API, there are some language-specific notes.
+
+* [C++](https://github.com/google/diff-match-patch/wiki/Language:-Cpp)
+* [C#](https://github.com/google/diff-match-patch/wiki/Language:-C%23)
+* [Dart](https://github.com/google/diff-match-patch/wiki/Language:-Dart)
+* [Java](https://github.com/google/diff-match-patch/wiki/Language:-Java)
+* [JavaScript](https://github.com/google/diff-match-patch/wiki/Language:-JavaScript)
+* [Lua](https://github.com/google/diff-match-patch/wiki/Language:-Lua)
+* [Objective-C](https://github.com/google/diff-match-patch/wiki/Language:-Objective-C)
+* [Python](https://github.com/google/diff-match-patch/wiki/Language:-Python)
+
+A standardized speed test tracks the [relative performance of diffs](https://docs.google.com/spreadsheets/d/1zpZccuBpjMZTvL1nGDMKJc7rWL_m_drF4XKOJvB27Kc/edit#gid=0) in each language.
+
+### Algorithms
+This library implements [Myer's diff algorithm](https://neil.fraser.name/writing/diff/myers.pdf) which is generally considered to be the best general-purpose diff. A layer of [pre-diff speedups and post-diff cleanups](https://neil.fraser.name/writing/diff/) surround the diff algorithm, improving both performance and output quality.
+
+This library also implements a [Bitap matching algorithm](https://neil.fraser.name/writing/patch/bitap.ps) at the heart of a [flexible matching and patching strategy](https://neil.fraser.name/writing/patch/).
+
+[DMP]: https://github.com/google/diff-match-patch
+[API]: https://github.com/google/diff-match-patch/wiki/API
+
+
+
+
+%prep
+%autosetup -n diff-match-patch-20200713
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-diff-match-patch -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri Feb 24 2023 Python_Bot <Python_Bot@openeuler.org> - 20200713-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..62100ba
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+6fd897ce03d7a8bff8bbf607bbd58834 diff-match-patch-20200713.tar.gz