15
0

Accepting request 1134117 from devel:languages:python

- Update to 20230430:
  * Replaced deprecated `imp` usage with `importlib` (#7)
  * Migrated to PEP 621 metadata, flit
  * Reformated with updated black/µsort/µfmt
  * Tested on Python 3.7 - 3.11
  * Dropped support for Python 2.7, 3.5, and 3.6
- Switch to pyproject, autosetup and pyunittest macros.
- Stop using greedy globs in %files.

OBS-URL: https://build.opensuse.org/request/show/1134117
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-diff-match-patch?expand=0&rev=3
This commit is contained in:
2023-12-20 20:02:11 +00:00
committed by Git OBS Bridge
4 changed files with 25 additions and 14 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:da6f5a01aa586df23dfc89f3827e1cafbb5420be9d87769eeb079ddfd9477a18
size 60711

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:953019cdb9c9d2c9e47b5b12bcff3cf4746fc4598eb406076fa1fc27e6a1f15c
size 43324

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Wed Dec 20 02:07:58 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 20230430:
* Replaced deprecated `imp` usage with `importlib` (#7)
* Migrated to PEP 621 metadata, flit
* Reformated with updated black/µsort/µfmt
* Tested on Python 3.7 - 3.11
* Dropped support for Python 2.7, 3.5, and 3.6
- Switch to pyproject, autosetup and pyunittest macros.
- Stop using greedy globs in %files.
-------------------------------------------------------------------
Wed Aug 19 17:37:55 UTC 2020 - Matthias Fehring <buschmann23@opensuse.org>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-diff-match-patch
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,18 +16,17 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-diff-match-patch
Version: 20200713
Version: 20230430
Release: 0
Summary: Repackaging of Google's Diff Match and Patch libraries
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/diff-match-patch-python/diff-match-patch
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_module setuptools >= 38.6.0}
BuildRequires: %{python_module flit-core}
BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Provides: python-diff_match_patch
@@ -39,23 +38,23 @@ BuildArch: noarch
Offers algorithms to perform the operations required for synchronizing plain text
%prep
%setup -q -n diff-match-patch-%{version}
%autosetup -p1 -n diff-match-patch-%{version}
find . -name "*.py" -type f -exec sed -i '1s/^#!.*//' {} \+
%patch0 -p1
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_exec -m unittest diff_match_patch.tests.run_all
%pyunittest diff_match_patch.tests.run_all
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/*
%{python_sitelib}/diff_match_patch
%{python_sitelib}/diff_match_patch-%{version}.dist-info
%changelog