14
0

- Convert to pip-based build and libalternatives

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-subgrab?expand=0&rev=11
This commit is contained in:
2025-06-13 12:13:20 +00:00
committed by Git OBS Bridge
parent af0f8ab1e1
commit 1b9696b653
2 changed files with 17 additions and 12 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jun 13 12:13:00 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build and libalternatives
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jun 11 04:08:36 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com> Thu Jun 11 04:08:36 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-subgrab # spec file for package python-subgrab
# #
# Copyright (c) 2020 SUSE LLC # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,7 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without libalternatives
Name: python-subgrab Name: python-subgrab
Version: 1.0.4 Version: 1.0.4
Release: 0 Release: 0
@@ -24,15 +24,17 @@ Summary: Script to download subtitles for media files
License: GPL-3.0-only License: GPL-3.0-only
URL: https://github.com/RafayGhafoor/Subscene-Subtitle-Grabber URL: https://github.com/RafayGhafoor/Subscene-Subtitle-Grabber
Source: https://files.pythonhosted.org/packages/source/s/subgrab/subgrab-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/s/subgrab/subgrab-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: unzip BuildRequires: unzip
Requires: alts
Requires: python-beautifulsoup4 Requires: python-beautifulsoup4
Requires: python-lxml Requires: python-lxml
Requires: python-requests Requires: python-requests
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@@ -46,21 +48,19 @@ rm -rf subgrab.egg-info
sed -i 's/bs4/beautifulsoup4/g' setup.py sed -i 's/bs4/beautifulsoup4/g' setup.py
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_clone -a %{buildroot}%{_bindir}/subgrab %python_clone -a %{buildroot}%{_bindir}/subgrab
%python_expand %fdupes %{buildroot}/%{$python_sitelib} %python_expand %fdupes %{buildroot}/%{$python_sitelib}
%post %pre
%python_install_alternative subgrab %python_libalternatives_reset_alternative subgrab
%postun
%python_uninstall_alternative subgrab
%files %{python_files} %files %{python_files}
%python_alternative %{_bindir}/subgrab %python_alternative %{_bindir}/subgrab
%{python_sitelib}/* %{python_sitelib}/subgrab
%{python_sitelib}/subgrab-%{version}*-info
%changelog %changelog