Use Python 3 for EPEL-7.

epel9
Matěj Cepl 7 years ago
parent 405b00f60d
commit 1b9b803e91
No known key found for this signature in database
GPG Key ID: 79205802880BC9D8

@ -1,2 +1,2 @@
SHA512 (youtube-dl-2018.03.10.tar.gz) = eca882a1b39ae5e5a5b20462a2c4baf9717584463f5e4bfe12ddda85b495bd792cd85bd14d3e37fc512562d6b2c219d6c35a91bacfdc7751bf2e98e5b4e9442b SHA512 (youtube-dl-2018.03.26.1.tar.gz) = 1c183bfa86b7317f260bb077df41eb17d9d1ce4707a6473529ec6cfbd90d519a4621589d6b3db51ba7445348f3064204b31a2af31ef5128384d4b825dbfcfbf5
SHA512 (youtube-dl-2018.03.10.tar.gz.sig) = 8c6b9861a9623bf9756434634389f362979d817270cfbe5d0a3800290af982b34637f740e6030a2e97a96c2c49390caebe7a0429785aca3e792985250168c694 SHA512 (youtube-dl-2018.03.26.1.tar.gz.sig) = 9b89b5ff5804c302df12b975ec8b798c76da9cbd97cec1c834509760ea9e283fbd2207bf3ff39788bcb32d0a6df6ce3261c123a265aee3f6075bc2e2ccd3e3e8

@ -1,4 +1,10 @@
%if 0%{?rhel} && 0%{?rhel} <= 6 %if 0%{?rhel} && 0%{?rhel} < 7
%bcond_with python3
%else
%bcond_without python3
%endif
%if ! %{with python3}
%{!?__python2: %global __python2 /usr/bin/python2} %{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
@ -6,7 +12,7 @@
%endif %endif
Name: youtube-dl Name: youtube-dl
Version: 2018.03.10 Version: 2018.03.26.1
Release: 1%{?dist} Release: 1%{?dist}
Summary: A small command-line program to download online videos Summary: A small command-line program to download online videos
License: Unlicense License: Unlicense
@ -20,8 +26,8 @@ Source1: https://github.com/rg3/youtube-dl/releases/download/%{version}/y
# "7D33 D762 FD6C 3513 0481 347F DB4B 54CB A482 6A18" > youtube-dl-gpgkeys.gpg # "7D33 D762 FD6C 3513 0481 347F DB4B 54CB A482 6A18" > youtube-dl-gpgkeys.gpg
Source2: youtube-dl-gpgkeys.gpg Source2: youtube-dl-gpgkeys.gpg
Source3: %{name}.conf Source3: %{name}.conf
%if 0%{?fedora} %if %{with python3}
BuildRequires: python3-devel BuildRequires: python%{python3_pkgversion}-devel
%else %else
BuildRequires: python2-devel BuildRequires: python2-devel
%endif %endif
@ -53,7 +59,7 @@ sed -i '/README.txt/d' setup.py
find youtube_dl -type f -exec sed -i -e '1{/^\#!\/usr\/bin\/env python$/d;};' {} + find youtube_dl -type f -exec sed -i -e '1{/^\#!\/usr\/bin\/env python$/d;};' {} +
%build %build
%if 0%{?fedora} %if %{with python3}
%py3_build %py3_build
%else %else
%py2_build %py2_build
@ -61,7 +67,7 @@ find youtube_dl -type f -exec sed -i -e '1{/^\#!\/usr\/bin\/env python$/d;};' {}
%install %install
%if 0%{?fedora} %if %{with python3}
%py3_install %py3_install
%else %else
%py2_install %py2_install
@ -69,7 +75,7 @@ find youtube_dl -type f -exec sed -i -e '1{/^\#!\/usr\/bin\/env python$/d;};' {}
mkdir -p %{buildroot}%{_sysconfdir} mkdir -p %{buildroot}%{_sysconfdir}
install -pm644 %{S:3} %{buildroot}%{_sysconfdir} install -pm644 %{S:3} %{buildroot}%{_sysconfdir}
%if 0%{?fedora} %if %{with python3}
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
install -pm644 youtube-dl.bash-completion %{buildroot}%{_datadir}/bash-completion/completions/youtube-dl install -pm644 youtube-dl.bash-completion %{buildroot}%{_datadir}/bash-completion/completions/youtube-dl
%else %else
@ -90,7 +96,7 @@ install -pm644 youtube-dl.zsh %{buildroot}%{_datadir}/zsh/site-functions/_youtub
%files %files
%doc README.md %doc README.md
%if 0%{?fedora} %if %{with python3}
%{python3_sitelib}/youtube_dl/ %{python3_sitelib}/youtube_dl/
%{python3_sitelib}/youtube_dl*.egg-info %{python3_sitelib}/youtube_dl*.egg-info
%else %else
@ -101,7 +107,7 @@ install -pm644 youtube-dl.zsh %{buildroot}%{_datadir}/zsh/site-functions/_youtub
%{_bindir}/%{name} %{_bindir}/%{name}
%{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}.1*
%config(noreplace) %{_sysconfdir}/%{name}.conf %config(noreplace) %{_sysconfdir}/%{name}.conf
%if 0%{?fedora} %if %{with python3}
%{_datadir}/bash-completion/completions/%{name} %{_datadir}/bash-completion/completions/%{name}
%else %else
%{_sysconfdir}/bash_completion.d/%{name} %{_sysconfdir}/bash_completion.d/%{name}
@ -110,6 +116,9 @@ install -pm644 youtube-dl.zsh %{buildroot}%{_datadir}/zsh/site-functions/_youtub
%changelog %changelog
* Mon Mar 26 2018 Matěj Cepl <mcepl@redhat.com> - 2018.03.26.1-1
- Use Python 3 for EPEL-7.
* Wed Mar 14 2018 Matěj Cepl <mcepl@redhat.com> - 2018.03.10-1 * Wed Mar 14 2018 Matěj Cepl <mcepl@redhat.com> - 2018.03.10-1
- Update to the latest release. - Update to the latest release.

Loading…
Cancel
Save