diff --git a/yt-dlp.changes b/yt-dlp.changes index 42ef928..340ecb7 100644 --- a/yt-dlp.changes +++ b/yt-dlp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 23 12:34:56 UTC 2025 - olaf@aepfle.de + +- Use the pythons macro to reduce the amount of suse_version usage + ------------------------------------------------------------------- Wed Oct 22 15:41:02 UTC 2025 - Luigi Baldoni diff --git a/yt-dlp.spec b/yt-dlp.spec index df971fb..f2505ed 100644 --- a/yt-dlp.spec +++ b/yt-dlp.spec @@ -16,11 +16,9 @@ # -%define skip_python2 1 -%define skip_python36 1 -%define skip_python37 1 -%define skip_python38 1 -%if 0%{?suse_version} < 1600 +%if %{defined primary_python} +%define pythons %primary_python +%else %if 0%{?sle_version} == 150700 %global pythons python313 %else @@ -50,15 +48,7 @@ Obsoletes: yt-dlp-fish-completion < %version-%release Provides: yt-dlp-fish-completion = %version-%release Obsoletes: yt-dlp-zsh-completion < %version-%release Provides: yt-dlp-zsh-completion = %version-%release -%if 0%{?suse_version} < 1600 -%if 0%{?sle_version} == 150700 -Requires: python313-yt-dlp = %version -%else -Requires: python312-yt-dlp = %version -%endif -%else -Requires: python3-yt-dlp = %version -%endif +Requires: %pythons-yt-dlp = %version %define python_subpackage_only 1 %python_subpackages @@ -103,13 +93,7 @@ rm -f youtube-dl yt-dlp # A self-decompressing yt-dlp is built only when python_build is not # exercised; else yt-dlp is a loader. # -%if 0%{?suse_version} < 1600 -%if 0%{?sle_version} == 150700 -export PYTHON=%__python313 -%else -export PYTHON=%__python312 -%endif -%endif +export PYTHON=$(type -P "%_bindir/python%{python_bin_suffix}" | xargs --no-run-if-empty readlink -f) %pyproject_wheel %make_build yt-dlp