Accepting request 1120155 from network:utilities
- Rework Python build procedure [boo#1216467] OBS-URL: https://build.opensuse.org/request/show/1120155 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/yt-dlp?expand=0&rev=31
This commit is contained in:
commit
33765ccaa2
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 25 03:06:38 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Rework Python build procedure [boo#1216467]
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Oct 22 22:36:58 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
|
Sun Oct 22 22:36:58 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
71
yt-dlp.spec
71
yt-dlp.spec
@ -16,6 +16,10 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define skip_python2 1
|
||||||
|
%define skip_python36 1
|
||||||
|
%define skip_python37 1
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
Name: yt-dlp
|
Name: yt-dlp
|
||||||
Version: 2023.10.13
|
Version: 2023.10.13
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -24,42 +28,19 @@ License: CC-BY-SA-3.0 AND SUSE-Public-Domain
|
|||||||
Group: Productivity/Networking/Web/Utilities
|
Group: Productivity/Networking/Web/Utilities
|
||||||
URL: https://github.com/yt-dlp/yt-dlp
|
URL: https://github.com/yt-dlp/yt-dlp
|
||||||
Source: https://github.com/yt-dlp/yt-dlp/releases/download/%version/yt-dlp.tar.gz
|
Source: https://github.com/yt-dlp/yt-dlp/releases/download/%version/yt-dlp.tar.gz
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: make >= 4
|
BuildRequires: make >= 4
|
||||||
%if 0%{?suse_version} > 1500
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python3-devel >= 3.8
|
|
||||||
%else
|
|
||||||
%if 0%{?sle_version} > 150400
|
|
||||||
BuildRequires: python311-devel
|
|
||||||
%else
|
|
||||||
%if 0%{?sle_version} > 150300
|
|
||||||
BuildRequires: python310-devel
|
|
||||||
%else
|
|
||||||
BuildRequires: python39-devel
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
BuildRequires: zip
|
BuildRequires: zip
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Requires: ffmpeg
|
Requires: ffmpeg
|
||||||
BuildRequires: %{python_module setuptools}
|
Requires: python3-yt-dlp
|
||||||
%if 0%{?suse_version} > 1500
|
Suggests: python-Brotli
|
||||||
Requires: python3 >= 3.8
|
Suggests: python-certifi
|
||||||
Suggests: python3-Brotli
|
Suggests: python-mutagen
|
||||||
Suggests: python3-certifi
|
Suggests: python-pycryptodomex
|
||||||
Suggests: python3-mutagen
|
Suggests: python-websockets
|
||||||
Suggests: python3-pycryptodomex
|
|
||||||
Suggests: python3-websockets
|
|
||||||
%else
|
|
||||||
%if 0%{?sle_version} > 150400
|
|
||||||
Requires: python311
|
|
||||||
%else
|
|
||||||
%if 0%{?sle_version} > 150300
|
|
||||||
Requires: python310
|
|
||||||
%else
|
|
||||||
Requires: python39
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -105,29 +86,17 @@ The direct Python interface into yt-dlp.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
rm -f youtube-dl yt-dlp
|
rm -f youtube-dl yt-dlp
|
||||||
%if 0%{?suse_version} > 1500
|
#
|
||||||
PYTHON="%_bindir/python3" \
|
# A self-decompressing yt-dlp is built only when python_build is not
|
||||||
%else
|
# exercised; else yt-dlp is a loader.
|
||||||
%if 0%{?sle_version} > 150400
|
#
|
||||||
PYTHON="%_bindir/python3.11" \
|
%python_build
|
||||||
%else
|
%make_build yt-dlp
|
||||||
%if 0%{?sle_version} > 150300
|
|
||||||
PYTHON="%_bindir/python3.10" \
|
|
||||||
%else
|
|
||||||
PYTHON="%_bindir/python3.9" \
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
%make_build yt-dlp
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
b="%buildroot"
|
b="%buildroot"
|
||||||
install -Dvm0755 yt-dlp "$b/%_bindir/yt-dlp"
|
|
||||||
install -Dvm0644 completions/bash/yt-dlp "$b/%_datadir/bash-completion/completions/yt-dlp"
|
|
||||||
install -Dvm0644 completions/zsh/_yt-dlp "$b/%_datadir/zsh/site-functions/_yt-dlp"
|
|
||||||
install -Dvm0644 completions/fish/yt-dlp.fish "$b/%_datadir/fish/completions/yt-dlp.fish"
|
|
||||||
install -Dvm0644 yt-dlp.1 "$b/%_mandir/man1/yt-dlp.1"
|
|
||||||
%python_install
|
%python_install
|
||||||
|
%fdupes %buildroot/usr
|
||||||
rm -Rf "$b/%_datadir/doc"
|
rm -Rf "$b/%_datadir/doc"
|
||||||
|
|
||||||
%files -n yt-dlp
|
%files -n yt-dlp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user