forked from pool/python-subliminal
Accepting request 510013 from home:alois:branches:devel:languages:python
Converted to single-spec OBS-URL: https://build.opensuse.org/request/show/510013 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-subliminal?expand=0&rev=8
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 13 07:32:27 UTC 2017 - aloisio@gmx.com
|
||||||
|
|
||||||
|
- Converted to single-spec
|
||||||
|
- Switched source URL to pypi
|
||||||
|
- Ship executable only with python3
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 15 14:49:22 UTC 2016 - aloisio@gmx.com
|
Thu Dec 15 14:49:22 UTC 2016 - aloisio@gmx.com
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-subliminal
|
# spec file for package python-subliminal
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# 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,8 +16,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define subliminal_priority 30
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
%define oldpython python
|
||||||
Name: python-subliminal
|
Name: python-subliminal
|
||||||
Version: 2.0.5
|
Version: 2.0.5
|
||||||
Release: 0
|
Release: 0
|
||||||
@@ -25,61 +25,67 @@ Summary: Python library to search and download subtitles
|
|||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: https://github.com/Diaoul/subliminal
|
Url: https://github.com/Diaoul/subliminal
|
||||||
Source0: https://github.com/Diaoul/subliminal/archive/%{version}.tar.gz#/subliminal-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/s/subliminal/subliminal-%{version}.tar.gz
|
||||||
|
# find a way to generate this
|
||||||
Source1: subliminal.1
|
Source1: subliminal.1
|
||||||
|
BuildRequires: %{python_module Sphinx}
|
||||||
|
BuildRequires: %{python_module babelfish >= 0.5.4}
|
||||||
|
BuildRequires: %{python_module beautifulsoup4 >= 4.4.0}
|
||||||
|
BuildRequires: %{python_module chardet >= 2.3.0}
|
||||||
|
BuildRequires: %{python_module click >= 4.1}
|
||||||
|
BuildRequires: %{python_module devel >= 2.7}
|
||||||
|
BuildRequires: %{python_module dogpile.cache >= 0.6.0}
|
||||||
|
BuildRequires: %{python_module enzyme >= 0.4.1}
|
||||||
|
BuildRequires: %{python_module pysrt >= 1.0.1}
|
||||||
|
BuildRequires: %{python_module pyxdg >= 0.25}
|
||||||
|
BuildRequires: %{python_module requests >= 2.7.0}
|
||||||
|
BuildRequires: %{python_module setuptools >= 18.0.1}
|
||||||
|
BuildRequires: %{python_module six >= 1.9.0}
|
||||||
|
BuildRequires: python2-guessit >= 2.0.1
|
||||||
|
BuildRequires: python2-html5lib >= 0.999999
|
||||||
|
BuildRequires: python2-pbr >= 1.3.0
|
||||||
|
BuildRequires: python2-python-dateutil >= 2.2
|
||||||
|
BuildRequires: python2-rarfile >= 2.7
|
||||||
|
BuildRequires: python3-appdirs >= 1.3
|
||||||
|
# stevedore is not yet unified
|
||||||
|
BuildRequires: %{oldpython}-stevedore >= 1.6.0
|
||||||
|
BuildRequires: python3-stevedore >= 1.6.0
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-argparse >= 1.3.0
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python-babelfish >= 0.5.5
|
%ifpython2
|
||||||
BuildRequires: python-beautifulsoup4 >= 4.4.0
|
Requires: python-futures >= 3.0
|
||||||
BuildRequires: python-chardet >= 2.3.0
|
Requires: python-html5lib >= 0.999999
|
||||||
BuildRequires: python-click >= 4.1
|
Requires: python-python-dateutil >= 2.2
|
||||||
BuildRequires: python-devel >= 2.7
|
Requires: python-pbr >= 1.3.0
|
||||||
BuildRequires: python-dogpile.cache >= 0.6.0
|
# Stevedore is not yet unified
|
||||||
BuildRequires: python-enzyme >= 0.4.1
|
Requires: %{oldpython}-stevedore >= 1.6.0
|
||||||
BuildRequires: python-guessit >= 2.0.1
|
%endif
|
||||||
BuildRequires: python-html5lib >= 0.999999
|
%ifpython3
|
||||||
BuildRequires: python-pbr >= 1.3.0
|
Requires: python-dbm
|
||||||
BuildRequires: python-pysrt >= 1.0.1
|
Requires: python3-stevedore >= 1.6.0
|
||||||
BuildRequires: python-python-dateutil >= 2.2
|
%endif
|
||||||
BuildRequires: python-requests >= 2.7.0
|
|
||||||
BuildRequires: python-setuptools >= 18.0.1
|
|
||||||
BuildRequires: python-six >= 1.9.0
|
|
||||||
BuildRequires: python-stevedore >= 1.6.0
|
|
||||||
BuildRequires: python-xdg >= 0.25
|
|
||||||
Requires: python-appdirs >= 1.3
|
Requires: python-appdirs >= 1.3
|
||||||
Requires: python-argparse >= 1.3.0
|
|
||||||
Requires: python-babelfish >= 0.5.4
|
Requires: python-babelfish >= 0.5.4
|
||||||
Requires: python-beautifulsoup4 >= 4.4.0
|
Requires: python-beautifulsoup4 >= 4.4.0
|
||||||
Requires: python-chardet >= 2.3.0
|
Requires: python-chardet >= 2.3.0
|
||||||
Requires: python-click >= 4.1
|
Requires: python-click >= 4.1
|
||||||
Requires: python-dogpile.cache >= 0.6.0
|
Requires: python-dogpile.cache >= 0.6.0
|
||||||
Requires: python-enzyme >= 0.4.1
|
Requires: python-enzyme >= 0.4.1
|
||||||
Requires: python-futures >= 3.0
|
|
||||||
Requires: python-guessit >= 2.0.1
|
|
||||||
Requires: python-html5lib >= 0.999999
|
|
||||||
Requires: python-python-dateutil >= 2.2
|
|
||||||
%if 0%{?suse_version} <= 1320 && 0%{?is_opensuse} == 0
|
|
||||||
Requires: python-ndg-httpsclient
|
|
||||||
%endif
|
|
||||||
Requires: python-pbr >= 1.3.0
|
|
||||||
Requires: python-guessit >= 2.0.1
|
Requires: python-guessit >= 2.0.1
|
||||||
Requires: python-pysrt >= 1.0.1
|
Requires: python-pysrt >= 1.0.1
|
||||||
Requires: python-pytz >= 2012c
|
Requires: python-pytz >= 2012c
|
||||||
Requires: python-rarfile >= 2.7
|
Requires: python-rarfile >= 2.7
|
||||||
Requires: python-requests >= 2.7.0
|
Requires: python-requests >= 2.7.0
|
||||||
Requires: python-six >= 1.9.0
|
Requires: python-six >= 1.9.0
|
||||||
Requires: python-stevedore >= 1.6.0
|
Requires: python-pyxdg >= 0.25
|
||||||
Requires: python-xdg >= 0.25
|
|
||||||
Recommends: python-colorlog >= 2.6.0
|
Recommends: python-colorlog >= 2.6.0
|
||||||
Requires(post): update-alternatives
|
|
||||||
Requires(postun): update-alternatives
|
|
||||||
Conflicts: subliminal
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%if 0%{?suse_version} > 1110
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%endif
|
%ifpython3
|
||||||
Provides: subliminal = %{version}
|
Provides: subliminal = %{version}
|
||||||
Obsoletes: subliminal < %{version}
|
Obsoletes: subliminal < %{version}
|
||||||
|
%endif
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Subliminal is a python library to search and download subtitles.
|
Subliminal is a python library to search and download subtitles.
|
||||||
@@ -87,49 +93,22 @@ It comes with an easy to use CLI suitable for direct use or cron jobs.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -n subliminal-%{version}
|
%setup -n subliminal-%{version}
|
||||||
# set the exe name
|
|
||||||
sed -e 's/subliminal = subliminal.cli:subliminal/subliminal-%{py_ver} = subliminal.cli:subliminal/' -i setup.py
|
|
||||||
gzip < %{SOURCE1} > subliminal-%{py_ver}.1.gz
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}
|
%python_install
|
||||||
mkdir -p %{buildroot}/%{_docdir}/%{name}
|
|
||||||
mkdir -p %{buildroot}/%{_mandir}/man1
|
mkdir -p %{buildroot}/%{_mandir}/man1
|
||||||
install -m 644 subliminal-%{py_ver}.1.gz -t %{buildroot}/%{_mandir}/man1
|
install -m 644 %{SOURCE1} -t %{buildroot}/%{_mandir}/man1
|
||||||
# Setup update-alternatives
|
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
||||||
touch %{buildroot}%{_sysconfdir}/alternatives/subliminal
|
|
||||||
touch %{buildroot}%{_sysconfdir}/alternatives/subliminal.1.gz
|
|
||||||
ln -s -f %{_sysconfdir}/alternatives/subliminal %{buildroot}%{_bindir}/subliminal
|
|
||||||
ln -s -f %{_sysconfdir}/alternatives/subliminal.1.gz %{buildroot}%{_mandir}/man1/subliminal.1.gz
|
|
||||||
%fdupes -s %{buildroot}
|
|
||||||
|
|
||||||
%post
|
%files %{python_files}
|
||||||
update-alternatives \
|
|
||||||
--install %{_bindir}/subliminal subliminal %{_bindir}/subliminal-%{py_ver} \
|
|
||||||
%{subliminal_priority} \
|
|
||||||
--slave %{_mandir}/man1/subliminal.1.gz subliminal.1.gz %{_mandir}/man1/subliminal-%{py_ver}.1.gz
|
|
||||||
|
|
||||||
%postun
|
|
||||||
# Note: we don't use "$1 -eq 0", to avoid issues if the package gets renamed
|
|
||||||
if [ ! -f %{_bindir}/subliminal-%{py_ver} ]; then
|
|
||||||
update-alternatives --remove subliminal %{_bindir}/subliminal-%{py_ver}
|
|
||||||
fi
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc HISTORY.rst LICENSE README.rst
|
%doc HISTORY.rst LICENSE README.rst
|
||||||
%{_bindir}/subliminal
|
%python3_only %{_bindir}/subliminal
|
||||||
%{_bindir}/subliminal-%{py_ver}
|
%python3_only %{_mandir}/man1/subliminal.1%{ext_man}
|
||||||
%ghost %{_sysconfdir}/alternatives/subliminal
|
%{python_sitelib}/subliminal
|
||||||
%{_mandir}/man1/subliminal.1.gz
|
%{python_sitelib}/subliminal-%{version}-py%{python_version}.egg-info
|
||||||
%{_mandir}/man1/subliminal-%{py_ver}.1.gz
|
|
||||||
%ghost %{_sysconfdir}/alternatives/subliminal.1.gz
|
|
||||||
%dir %{python_sitelib}/subliminal
|
|
||||||
%{python_sitelib}/subliminal/*
|
|
||||||
%{python_sitelib}/subliminal-%{version}-py%{py_ver}.egg-info
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user