forked from pool/python-pysrt
Accepting request 483166 from home:alois:branches:devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/483166 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysrt?expand=0&rev=3
This commit is contained in:
committed by
Git OBS Bridge
parent
1d727bb527
commit
8707185d11
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pysrt
|
||||
#
|
||||
# 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
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,6 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-pysrt
|
||||
Version: 1.1.1
|
||||
Release: 0
|
||||
@@ -24,17 +25,16 @@ License: GPL-3.0
|
||||
Group: System/Libraries
|
||||
Url: https://github.com/byroot/pysrt
|
||||
Source0: https://pypi.python.org/packages/source/p/pysrt/pysrt-%{version}.tar.gz
|
||||
Source1: python-pysrt-rpmlintrc
|
||||
BuildRequires: %{python_module base}
|
||||
BuildRequires: %{python_module chardet}
|
||||
BuildRequires: %{python_module nose}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python
|
||||
BuildRequires: python-chardet
|
||||
BuildRequires: python-setuptools
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: python
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-chardet
|
||||
%if 0%{?suse_version} > 1110
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
pysrt is a python library to search and download subtitles.
|
||||
@@ -42,19 +42,23 @@ It comes with an easy to use CLI suitable for direct use or cron jobs.
|
||||
|
||||
%prep
|
||||
%setup -q -n pysrt-%{version}
|
||||
# Remove shebang from non-executable file
|
||||
sed -e '1d' -i pysrt/commands.py
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
python setup.py install -O1 --skip-build --prefix=%{_prefix} --root=%{buildroot}
|
||||
%fdupes -s %{buildroot}
|
||||
%python_install
|
||||
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
||||
|
||||
%files
|
||||
%check
|
||||
%python_exec %{_bindir}/nosetests
|
||||
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/srt
|
||||
%dir %{python_sitelib}/pysrt
|
||||
%{python_sitelib}/pysrt/*
|
||||
%{python_sitelib}/pysrt-%{version}-py%{py_ver}.egg-info
|
||||
%python3_only %{_bindir}/srt
|
||||
%{python_sitelib}/pysrt
|
||||
%{python_sitelib}/pysrt-%{version}-py%{python_version}.egg-info
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user