Accepting request 1121580 from home:buschmann23:branches:devel:languages:python
- update to version 2.5.31
* no changelog available, alternatively have a look at
https://github.com/pre-commit/identify/compare/v2.2.13...v2.5.31
- use editdistance instead of ukkonen
* Upstream changed from editdistance_s to ukkonen for performance
reasons. Ukkonen is not now available for openSUSE. So switch
back to editdistance for now.
* Add 0001-use-editdistance-not-ukkonen.patch
- spec file changes
* remove not required python-setuptools from Requires
* upstream URL has changed to https://github.com/pre-commit/identify
* change requirement for python-editdistance from Suggests to
Recommends
OBS-URL: https://build.opensuse.org/request/show/1121580
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-identify?expand=0&rev=20
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-identify
|
||||
#
|
||||
# Copyright (c) 2021 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,24 +16,24 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-identify
|
||||
Version: 2.2.13
|
||||
Version: 2.5.31
|
||||
Release: 0
|
||||
Summary: File identification library for Python
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/chriskuehl/identify
|
||||
Source: https://github.com/chriskuehl/identify/archive/v%{version}.tar.gz#/identify-%{version}.tar.gz
|
||||
URL: https://github.com/pre-commit/identify
|
||||
Source: https://github.com/pre-commit/identify/archive/v%{version}.tar.gz#/identify-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE 0001-use-editdistance-not-ukkonen.patch -- ukkonen not packaged for opensuse now
|
||||
Patch1: 0001-use-editdistance-not-ukkonen.patch
|
||||
BuildRequires: %{python_module editdistance}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-setuptools
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
Suggests: python-editdistance
|
||||
Recommends: python-editdistance
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
@@ -42,9 +42,7 @@ File identification library for Python, including license file SPDX identifier.
|
||||
|
||||
%prep
|
||||
%setup -q -n identify-%{version}
|
||||
# stick with editdistance as it generally has more functionality
|
||||
sed -i 's/editdistance_s.distance/editdistance.eval/' identify/identify.py
|
||||
sed -i 's/editdistance_s/editdistance/' identify/identify.py
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -67,6 +65,7 @@ sed -i 's/editdistance_s/editdistance/' identify/identify.py
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%python_alternative %{_bindir}/identify-cli
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/identify
|
||||
%{python_sitelib}/identify-%{version}-*-info
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user