From 443cc3fe25acdb7f6d582076a606115b683e6f0e2f5b7e398ef28409aa227a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 28 Jan 2020 08:43:05 +0000 Subject: [PATCH] Accepting request 767241 from home:sebix required for spyder3 > 4 OBS-URL: https://build.opensuse.org/request/show/767241 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-diff-match-patch?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++ .gitignore | 1 + diff-match-patch-20181111.tar.gz | 3 ++ make-tests-runable.patch | 9 +++++ python-diff-match-patch.changes | 5 +++ python-diff-match-patch.spec | 60 ++++++++++++++++++++++++++++++++ 6 files changed, 101 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 diff-match-patch-20181111.tar.gz create mode 100644 make-tests-runable.patch create mode 100644 python-diff-match-patch.changes create mode 100644 python-diff-match-patch.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/diff-match-patch-20181111.tar.gz b/diff-match-patch-20181111.tar.gz new file mode 100644 index 0000000..08f050f --- /dev/null +++ b/diff-match-patch-20181111.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a809a996d0f09b9bbd59e9bbd0b71eed8c807922512910e05cbd3f9480712ddb +size 58554 diff --git a/make-tests-runable.patch b/make-tests-runable.patch new file mode 100644 index 0000000..4ef22ca --- /dev/null +++ b/make-tests-runable.patch @@ -0,0 +1,9 @@ +--- /dev/null 2020-01-25 08:09:49.736009393 +0100 ++++ diff-match-patch-20181111/diff_match_patch/tests/run_all.py 2020-01-25 15:33:14.805205323 +0100 +@@ -0,0 +1,6 @@ ++import sys ++ ++if sys.version_info < (3, ): ++ from .diff_match_patch_test_py2 import * ++else: ++ from .diff_match_patch_test import * diff --git a/python-diff-match-patch.changes b/python-diff-match-patch.changes new file mode 100644 index 0000000..f7b20ca --- /dev/null +++ b/python-diff-match-patch.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Sat Jan 25 14:05:38 UTC 2020 - Sebastian Wagner + +- initial package for version 20181111. +- add make-tests-runable.patch to be able to run the tests diff --git a/python-diff-match-patch.spec b/python-diff-match-patch.spec new file mode 100644 index 0000000..2c3d90c --- /dev/null +++ b/python-diff-match-patch.spec @@ -0,0 +1,60 @@ +# +# spec file for package python-diff-match-patch +# +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-diff-match-patch +Version: 20181111 +Release: 0 +License: Apache-2.0 +Summary: Repackaging of Google's Diff Match and Patch libraries +Url: https://github.com/diff-match-patch-python/diff-match-patch +Group: Development/Languages/Python +Source: https://files.pythonhosted.org/packages/source/d/diff-match-patch/diff-match-patch-%{version}.tar.gz +# PATCH-FIX-OPENSUSE make-tests-runable.patch -- running tests is too complicated to put that into the specfile +Patch0: make-tests-runable.patch +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools >= 38.6.0} +BuildRequires: fdupes +BuildArch: noarch + +%python_subpackages + +%description +Offers algorithms to perform the operations required for synchronizing plain text + +%prep +%setup -q -n diff-match-patch-%{version} +find . -name "*.py" -type f -exec sed -i '1s/^#!.*//' {} \+ +%patch0 -p1 + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%python_exec setup.py test -s diff_match_patch.tests.run_all + +%files %{python_files} +%doc README.md +%license LICENSE +%{python_sitelib}/* + +%changelog