7 Commits

Author SHA256 Message Date
9e9c3eb7c0 Accepting request 1268404 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1268404
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-guessit?expand=0&rev=27
2025-04-10 20:00:09 +00:00
4de54478fd Accepting request 1267962 from home:bnavigator:branches:openSUSE:Factory:Staging:adi:5
- Fix dependencies

OBS-URL: https://build.opensuse.org/request/show/1267962
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-guessit?expand=0&rev=58
2025-04-10 13:40:04 +00:00
7b85fd3ec8 Accepting request 1236985 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1236985
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-guessit?expand=0&rev=26
2025-01-12 10:22:10 +00:00
77052a58e2 Accepting request 1236906 from home:nkrapp:branches:devel:languages:python
- migrate to pyproject macros
- add remove-six.patch to drop dependency on python-six

OBS-URL: https://build.opensuse.org/request/show/1236906
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-guessit?expand=0&rev=56
2025-01-11 09:42:28 +00:00
2bb071bba4 Accepting request 1182909 from devel:languages:python
- Raise version requirement for python-rebulk (fixes boo#1226826)

OBS-URL: https://build.opensuse.org/request/show/1182909
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-guessit?expand=0&rev=25
2024-06-24 18:56:04 +00:00
e031e694fd OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-guessit?expand=0&rev=54 2024-06-23 16:56:31 +00:00
3217d87d9d Accepting request 1182905 from home:alois:branches:devel:languages:python
- Raise version requirement for python-rebulk (fixes boo#1226826)

OBS-URL: https://build.opensuse.org/request/show/1182905
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-guessit?expand=0&rev=53
2024-06-23 16:46:09 +00:00
3 changed files with 66 additions and 21 deletions

View File

@@ -1,3 +1,19 @@
-------------------------------------------------------------------
Tue Apr 8 17:37:51 UTC 2025 - Ben Greiner <code@bnavigator.de>
- Fix dependencies
-------------------------------------------------------------------
Fri Jan 10 15:47:50 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
- migrate to pyproject macros
- add remove-six.patch to drop dependency on python-six
-------------------------------------------------------------------
Sun Jun 23 14:36:07 UTC 2024 - Luigi Baldoni <aloisio@gmx.com>
- Raise version requirement for python-rebulk (fixes boo#1226826)
-------------------------------------------------------------------
Fri Feb 16 20:18:52 UTC 2024 - Luigi Baldoni <aloisio@gmx.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-guessit
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,9 @@
%if 0%{?suse_version} > 1500
%define with_tests 1
%bcond_without test
%else
%bcond_with test
%endif
Name: python-guessit
Version: 3.8.0
@@ -27,26 +29,32 @@ License: LGPL-3.0-only
Group: Development/Languages/Python
URL: https://github.com/wackou/guessit
Source0: https://files.pythonhosted.org/packages/source/g/guessit/guessit-%{version}.tar.gz
# PATCH-FIX-UPSTREAM remove-six.patch
Patch0: remove-six.patch
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module babelfish >= 0.6.0}
BuildRequires: %{python_module importlib_resources}
%if 0%{?with_tests}
BuildRequires: %{python_module importlib_resources if %python-base < 3.9}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module rebulk >= 3.2.0}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-babelfish >= 0.6.0
Requires: python-python-dateutil
Requires: python-rebulk >= 3.2.0
%if %{?python_version_nodots} < 39
Requires: python-importlib_resources
%endif
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module pytest >= 5}
BuildRequires: %{python_module pytest-benchmark}
BuildRequires: %{python_module pytest-mock >= 3.3.1}
%endif
BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module rebulk >= 3.1.0}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-babelfish >= 0.6.0
Requires: python-importlib-resources
Requires: python-python-dateutil
Requires: python-rebulk >= 3.1.0
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
@@ -57,7 +65,7 @@ a video using its filename only. This matcher works with both movies
and TV shows episodes.
%prep
%autosetup -n guessit-%{version}
%autosetup -p1 -n guessit-%{version}
# Remove shebang from non-executable files
for i in {'audio_codec','bit_rate','bonus','cd','container','country','crc','date','edition','episodes','episode_title','film','__init__','language','mimetype','other','part','release_group','screen_size','size','source','streaming_service','title','type','video_codec','website'}; do
sed -i -e "1d" "guessit/rules/properties/$i.py"
@@ -72,14 +80,14 @@ done
sed -i 's:.pytest-runner.::' setup.py
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/guessit
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if 0%{?with_tests}
%if %{with test}
%check
%pytest
%endif
@@ -95,6 +103,6 @@ sed -i 's:.pytest-runner.::' setup.py
%license LICENSE
%python_alternative %{_bindir}/guessit
%{python_sitelib}/guessit
%{python_sitelib}/guessit-%{version}-py%{python_version}.egg-info
%{python_sitelib}/guessit-%{version}.dist-info
%changelog

21
remove-six.patch Normal file
View File

@@ -0,0 +1,21 @@
Index: guessit-3.8.0/guessit/jsonutils.py
===================================================================
--- guessit-3.8.0.orig/guessit/jsonutils.py
+++ guessit-3.8.0/guessit/jsonutils.py
@@ -4,7 +4,6 @@ JSON Utils
"""
import json
-from six import text_type
from rebulk.match import Match
class GuessitEncoder(json.JSONEncoder):
@@ -16,6 +15,6 @@ class GuessitEncoder(json.JSONEncoder):
if isinstance(o, Match):
return o.advanced
if hasattr(o, 'name'): # Babelfish languages/countries long name
- return text_type(o.name)
+ return str(o.name)
# pragma: no cover
- return text_type(o)
+ return str(o)