14
0

Accepting request 655906 from devel:languages:python

Remove superfluous devel dependency for noarch package

OBS-URL: https://build.opensuse.org/request/show/655906
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyserial?expand=0&rev=16
This commit is contained in:
2018-12-14 19:46:58 +00:00
committed by Git OBS Bridge
2 changed files with 21 additions and 24 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Dec 4 12:52:50 UTC 2018 - Matej Cepl <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
-------------------------------------------------------------------
Mon Aug 7 16:32:29 UTC 2017 - toddrme2178@gmail.com

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pyserial
#
# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2018 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
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -20,23 +20,20 @@
Name: python-pyserial
Version: 3.4
Release: 0
Url: https://github.com/pyserial/pyserial
Summary: Python Serial Port Extension
License: Python-2.0
Group: Development/Languages/Python
URL: https://github.com/pyserial/pyserial
Source: https://files.pythonhosted.org/packages/source/p/pyserial/pyserial-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python3-Sphinx
BuildArch: noarch
Provides: python-serial = %{version}
Obsoletes: python-serial < %{version}
Requires(post): update-alternatives
Requires(preun): update-alternatives
Provides: python-serial = %{version}
Obsoletes: python-serial < %{version}
BuildArch: noarch
%python_subpackages
%description
@@ -53,16 +50,13 @@ Documentation, examples, and help files for %{name}.
%prep
%setup -q -n pyserial-%{version}
sed -i "s|^#\!\/usr\/bin\/env python$||" serial/{serialposix,__init__}.py # Fix non-executable scripts
sed -i "s/\r//" examples/port_publisher.py # Fix EOL encoding
find examples -name '*.py' -exec sed -i "s|^#!/usr/bin/env python$|#!%{__python3}|" {} \;
find examples -name '*.py' -exec sed -i "s|^#! /usr/bin/env python$|#!%{__python3}|" {} \;
find examples -name '*.py' -exec sed -i "s|^#! python$|#!%{__python3}|" {} \;
sed -i "s|^#!\/usr\/bin\/env python$||" serial/{serialposix,__init__}.py # Fix non-executable scripts
sed -i -e "s/\r//" examples/port_publisher.py # Fix EOL encoding
%build
%python_build
make -C documentation html && rm documentation/_build/html/.buildinfo # Build HTML documentation
make %{?_smp_mflags} -C documentation html && rm documentation/_build/html/.buildinfo # Build HTML documentation
sed -i -e "1{s|^#![[:space:]]*\/.*bin.*$|#!%{_bindir}/python3|}" examples/*.py
%install
%python_install
@@ -73,9 +67,9 @@ rm documentation/_build/doctrees/environment.pickle
%{python_expand pushd %{buildroot}%{$python_sitelib}
# Fix wrong-script-interpreter
sed -i "s|^#!/usr/bin/env python$|#!%{__$python}|" serial/tools/*.py
sed -i "s|^#!/usr/bin/env python3$|#!%{__$python}|" serial/threaded/__init__.py
sed -i "s|^#!/usr/bin/env python$|#!%{__$python}|" serial/rs485.py
sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" serial/tools/*.py
sed -i "s|^#!%{_bindir}/env python3$|#!%{__$python}|" serial/threaded/__init__.py
sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" serial/rs485.py
sed -i "s|^#! python$||#!%{__$python}|" serial/tools/*.py
chmod a+x serial/tools/*.py
chmod a-x serial/tools/__init__.py
@@ -97,16 +91,14 @@ popd
%python_uninstall_alternative miniterm
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGES.rst LICENSE.txt README.rst
%license LICENSE.txt
%doc CHANGES.rst README.rst
%python_alternative miniterm
%{python_sitelib}/serial/
%{python_sitelib}/pyserial-%{version}-py*.egg-info
%files -n %{name}-doc
%defattr(-,root,root,-)
%doc examples/
%doc documentation/_build/*
%changelog