From 923809dc7a062434e9f788a3c3f015cda0753ca2248d138cc85d5ad294f4f85a Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 14 Nov 2025 02:55:18 +0000 Subject: [PATCH] - Add patch support-python314.patch: * Don't use removed pkgutil function. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cinemagoer?expand=0&rev=9 --- .gitattributes | 23 ++++++ .gitignore | 1 + cinemagoer-2023.5.1.tar.gz | 3 + do_not_install_scripts.patch | 19 +++++ python-cinemagoer.changes | 152 +++++++++++++++++++++++++++++++++++ python-cinemagoer.spec | 95 ++++++++++++++++++++++ support-python314.patch | 56 +++++++++++++ 7 files changed, 349 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 cinemagoer-2023.5.1.tar.gz create mode 100644 do_not_install_scripts.patch create mode 100644 python-cinemagoer.changes create mode 100644 python-cinemagoer.spec create mode 100644 support-python314.patch 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/cinemagoer-2023.5.1.tar.gz b/cinemagoer-2023.5.1.tar.gz new file mode 100644 index 0000000..f3248be --- /dev/null +++ b/cinemagoer-2023.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ce1d77ae6546701618f11e5b1556a19d18edecad1b6d7d96973ec34941b18f2 +size 259366 diff --git a/do_not_install_scripts.patch b/do_not_install_scripts.patch new file mode 100644 index 0000000..bb5f377 --- /dev/null +++ b/do_not_install_scripts.patch @@ -0,0 +1,19 @@ +From: Ana Guerrero Lopez +Date: 2018-01-21 16:00:00 +0200 +Subject: do not install examples scripts under /usr/bin +Upstream: tbd + +Example scripts are installed under /usr/bin and it's prefered to keep +them in an examples directory. + +--- a/setup.py ++++ b/setup.py +@@ -82,7 +82,7 @@ + 'Source': 'https://github.com/cinemagoer/cinemagoer', + }, + 'download_url': dwnl_url, +- 'scripts': scripts, ++# 'scripts': scripts, + 'package_data': { + # Here, the "*" represents any possible language ID. + 'imdb.locale': [ diff --git a/python-cinemagoer.changes b/python-cinemagoer.changes new file mode 100644 index 0000000..8b139be --- /dev/null +++ b/python-cinemagoer.changes @@ -0,0 +1,152 @@ +------------------------------------------------------------------- +Fri Nov 14 02:54:42 UTC 2025 - Steve Kowalik + +- Add patch support-python314.patch: + * Don't use removed pkgutil function. + +------------------------------------------------------------------- +Mon Jun 16 06:12:17 UTC 2025 - Steve Kowalik + +- Switch to pyroject macros. + +------------------------------------------------------------------- +Wed Jun 19 10:32:30 UTC 2024 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Thu May 16 14:46:26 UTC 2024 - Dominique Leuenberger + +- Use %autosetup macro: allows us to eliminiate usage of deprecated + %patchN syntax. + +------------------------------------------------------------------- +Mon Jun 5 14:24:33 UTC 2023 - Ana Guerrero + +- Rename package from python-IMDbPY to python-cinemagoer +- Adds Provides/Obsoletes fields to handle package renaming +- Remove obsolete python-module macro. +- Update to 2023.5.1 + [http] + * #424: parse the "fullcredits" page for persons (courtesy of DLu) + * #443: fix parser for plot summary (courtesy of Saleh Dehqanpour) + * #448: always transform ratings to float + * various other parsers fixed +- Update to 2022.12.27 + [http] + * #419: more fixes for movie searches + * #426: support 308 Permanent Redirect HTTP code + * better handling of locales + * fixes for python2.7 +- Update to 2022.12.04 + [http] + * #232: add get_showtimes() method (courtesy of Kostya Farber) + * #388: add 'videos' key to extract movie trailer links + * #391: add parental guide advisory votes (courtesy of salehdeh76) + * #395: fix for some wrongly-formatted titles (courtesy of tsaklidis) + * #396: raise exception on resize image (courtesy of tsaklidis) + * #398: fix for production status + * #415: change User-Agent to a more complete form + * #419: fix movie and person searches + * #420: introduce a contributor guide (courtesy of Elizabeth Thorne) + * #421: fixes for person parsers +- Update to 2022.02.11 + [http] + * #373: include TV shows in get top 50 by genre + * #378: update documentation + [s3] + * #378: rename s32imdbpy.py to s32cinemagoer.py +- Update to 2022.01.25 + [general] + * #238: by default, exceptions are raised + * #315: include all script in the ./bin directory + * #318: fix kind of tv mini series in search results + * #369: do not rebuild locales running setup.py clean + * #371: support for 8-digit imdbIDs + * #378: renamed to cinemagoer + [http] + * #308: fix movie connections parser + * #319: parse review rating + * #327: do not strip new lines + * #329: improve localized and original title + * #330: fix for tv series for seasons not found + * #331: fix kind of tv mini series in search results + * #342: parse all information from full credits + * #343: fix for mpaa and certificates from parental guide page + * #344: extract advisories from parental guide page + * #346: collect raw info from country code + * #348: fix for series with no episodes + * #349: relevant keywords + * #357: add support for TV Special + * #366: fix full-size image links + * #372: support fox box office charts + +------------------------------------------------------------------- +Wed Apr 28 09:29:47 UTC 2021 - Markéta Machová + +- Update to 2021.04.18 + [general] + * #289: Serbian translations + * #290: update Portuguese translations + * #291: allow direct access to filmography keys + * #299: add pagination to get_movie_list (courtesy of Stein van Broekhoven) + * #300: any iterable can be used as season_nums parameter of update_series_seasons + * #305: fix ability to set logging level - #310: fix build of locales .mo files + * #312: extract localized title + [sql] + * #287: fix missing logger + +------------------------------------------------------------------- +Wed Mar 10 01:41:02 UTC 2021 - Steve Kowalik + +- Update to 2020.9.25: + * [general] + + #112: switch to a calendar versioning scheme + + #242: introduce the "imdbID" key with the actual imdbID for movies and + persons + + #247: use html escape + + #257: fix exception formatting string (courtesy of miigotu) + + #262: remove obsolete Feature key from setup.py + + #265: imdb.helpers.resizeImage function to manipulate image URLs + + #267: update regex to support imdbIndex without a year + + #275: update che path for Creator + + #284: use derived loggers (courtesy of jsynowiec) + + #282: use correct escape sequence for regular expressions + * [http] + + #134: fix movie awards parser + + #228: fix goofs parser + + #229: introduce the "original title" key + + #230: get_keyword method is now paginated + + #234: parse person awards (thanks to Volkan Yalcin) + + #237: fix quotes parser + + #241: introduce recommendations parser + + #244: fix parser for persons filmography + + #245: ability to fetch information about a single season + + #260: parsers for top rated tv show, top rated indian movies, most + popular tv shows and movies + + #273: ability to parse movie lists (courtesy of Stein van Broekhoven) + * [sql] + + #270: introduce a progress bar importing s3 dataset + + #278: fix access to s3 tables +- Update docs and license sections + +------------------------------------------------------------------- +Thu Jan 21 04:45:03 UTC 2021 - Steve Kowalik + +- Use python_alternative for imdbpy script, correct where we install the + language mo files from. + +------------------------------------------------------------------- +Thu Aug 1 09:47:34 UTC 2019 - Ana Guerrero Lopez + +- Update to version 6.8 + - In the release 6.8 (codename "Apollo 11") of IMDbPY, multiple + parsers were added and fixed; the new search_movie_advanced + method allows advanced movie searches + - See full changelog at + https://imdbpy.readthedocs.io/en/latest/Changelog.html + +------------------------------------------------------------------- +Mon Jan 21 11:34:40 UTC 2019 - aguerrero@suse.com + +- Initial release version 6.6. This is only for Python 3. diff --git a/python-cinemagoer.spec b/python-cinemagoer.spec new file mode 100644 index 0000000..8efa5f2 --- /dev/null +++ b/python-cinemagoer.spec @@ -0,0 +1,95 @@ +# +# spec file for package python-cinemagoer +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# 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 https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-cinemagoer +Version: 2023.5.1 +Release: 0 +Summary: Python package to access the IMDb's database +License: GPL-2.0-or-later +URL: https://cinemagoer.sourceforge.io/ +Source: https://files.pythonhosted.org/packages/source/c/cinemagoer/cinemagoer-%{version}.tar.gz +Patch0: do_not_install_scripts.patch +# PATCH-FIX-UPSTREAM Based on gh#cinemagoer/cinemagoer#543 +Patch1: support-python314.patch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-SQLAlchemy +Requires: python-lxml +Requires(post): update-alternatives +Requires(postun): update-alternatives +Provides: python-IMDbPY = %version-%release +Obsoletes: python-IMDbPY < %version-%release +BuildArch: noarch +%python_subpackages + +%description +cinemagoer is a Python package useful to retrieve and manage the data +of the IMDb movie database about movies, people, characters and companies. + +cinemagoer can retrieve data from both the IMDb's web server and a local +copy of the whole database. + +%prep +%autosetup -p1 -n cinemagoer-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +# Do not install python scripts under locale/, they are only used at build time +# for the translations +%python_expand rm %{buildroot}/%{$python_sitelib}/imdb/locale/*.py +%python_expand rm -rf %{buildroot}/%{$python_sitelib}/imdb/locale/__pycache__/ +%python_expand rm %{buildroot}/%{$python_sitelib}/imdb/locale/*.po +%python_clone -a %{buildroot}%{_bindir}/imdbpy + +%check +# Just about the entire testsuite wants network access +%pytest -k "test_series_full_cast_has_ids" + +%post +%python_install_alternative imdbpy + +%postun +%python_uninstall_alternative imdbpy + +%files %{python_files} +%doc README.rst CHANGELOG.txt +%license LICENSE.txt +%python_alternative %{_bindir}/imdbpy +%{python_sitelib}/cinemagoer-%{version}.dist-info +%{python_sitelib}/imdb +%lang(ar) %{python_sitelib}/imdb/locale/ar/LC_MESSAGES/imdbpy.mo +%lang(bg) %{python_sitelib}/imdb/locale/bg/LC_MESSAGES/imdbpy.mo +%lang(de) %{python_sitelib}/imdb/locale/de/LC_MESSAGES/imdbpy.mo +%lang(en) %{python_sitelib}/imdb/locale/en/LC_MESSAGES/imdbpy.mo +%lang(es) %{python_sitelib}/imdb/locale/es/LC_MESSAGES/imdbpy.mo +%lang(fr) %{python_sitelib}/imdb/locale/fr/LC_MESSAGES/imdbpy.mo +%lang(it) %{python_sitelib}/imdb/locale/it/LC_MESSAGES/imdbpy.mo +%lang(pt_BR) %{python_sitelib}/imdb/locale/pt_BR/LC_MESSAGES/imdbpy.mo +%lang(sr) %{python_sitelib}/imdb/locale/sr/LC_MESSAGES/imdbpy.mo +%lang(tr) %{python_sitelib}/imdb/locale/tr/LC_MESSAGES/imdbpy.mo + +%changelog diff --git a/support-python314.patch b/support-python314.patch new file mode 100644 index 0000000..dd77bcb --- /dev/null +++ b/support-python314.patch @@ -0,0 +1,56 @@ +From fec0b1a0f90e2d6201f6fa5fd429f13d9b7a747d Mon Sep 17 00:00:00 2001 +From: Jonas Stendahl +Date: Fri, 10 Oct 2025 22:59:05 +0200 +Subject: [PATCH] Migrate to find_spec + +--- + imdb/__init__.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +Index: cinemagoer-2023.5.1/imdb/__init__.py +=================================================================== +--- cinemagoer-2023.5.1.orig/imdb/__init__.py ++++ cinemagoer-2023.5.1/imdb/__init__.py +@@ -32,7 +32,7 @@ VERSION = __version__ + + import os + import sys +-from pkgutil import find_loader ++from importlib.util import find_spec + from types import FunctionType, MethodType + + from imdb import Character, Company, Movie, Person +@@ -214,9 +214,9 @@ Cinemagoer = IMDb + def available_access_systems(): + """Return the list of available data access systems.""" + asList = [] +- if find_loader('imdb.parser.http') is not None: ++ if find_spec('imdb.parser.http') is not None: + asList.append('http') +- if find_loader('imdb.parser.sql') is not None: ++ if find_spec('imdb.parser.sql') is not None: + asList.append('sql') + return asList + +Index: cinemagoer-2023.5.1/imdb/parser/http/piculet.py +=================================================================== +--- cinemagoer-2023.5.1.orig/imdb/parser/http/piculet.py ++++ cinemagoer-2023.5.1/imdb/parser/http/piculet.py +@@ -32,7 +32,7 @@ from argparse import ArgumentParser + from collections import deque + from functools import partial + from operator import itemgetter +-from pkgutil import find_loader ++from importlib.util import find_spec + + __version__ = '1.2b1' + +@@ -202,7 +202,7 @@ def html_to_xhtml(document, omit_tags=No + # sigalias: XPathResult = Union[Sequence[str], Sequence[Element]] + + +-_USE_LXML = find_loader('lxml') is not None ++_USE_LXML = find_spec('lxml') is not None + if _USE_LXML: + from lxml import etree as ElementTree + from lxml.etree import Element