forked from pool/python-pyserial
Accepting request 397069 from home:TheBlackCat:branches:devel:languages:python
update to version 3.0.1 OBS-URL: https://build.opensuse.org/request/show/397069 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyserial?expand=0&rev=13
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pyserial
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,23 +17,29 @@
|
||||
|
||||
|
||||
Name: python-pyserial
|
||||
Version: 2.7
|
||||
Version: 3.0.1
|
||||
Release: 0
|
||||
Url: http://pyserial.sourceforge.net/
|
||||
Url: https://github.com/pyserial/pyserial
|
||||
Summary: Python Serial Port Extension
|
||||
License: Python-2.0
|
||||
Group: Development/Languages/Python
|
||||
Source: http://pypi.python.org/packages/source/p/pyserial/pyserial-%{version}.tar.gz
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pyserial/pyserial-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: python-Sphinx
|
||||
BuildRequires: python
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-Sphinx
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
BuildRequires: python-importlib
|
||||
Requires: python-importlib
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
Provides: python-serial = %{version}
|
||||
Obsoletes: python-serial < %{version}
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
|
||||
%description
|
||||
Python Serial Port Extension for Win32, Linux, BSD, Jython, IronPython
|
||||
@@ -50,11 +56,28 @@ make -C documentation html && rm documentation/_build/html/.buildinfo # Build HT
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
mv %{buildroot}%{_bindir}/miniterm.py %{buildroot}%{_bindir}/miniterm-%{py_ver}
|
||||
ln -s -f %{_sysconfdir}/alternatives/miniterm %{buildroot}%{_bindir}/miniterm
|
||||
# create a dummy target for /etc/alternatives/miniterm
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/miniterm
|
||||
|
||||
%post
|
||||
"%_sbindir/update-alternatives" \
|
||||
--install %{_bindir}/miniterm miniterm %{_bindir}/miniterm-%{py_ver} 30
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
"%_sbindir/update-alternatives" --remove miniterm %{_bindir}/miniterm-%{py_ver}
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc CHANGES.txt LICENSE.txt README.txt examples documentation/_build/*
|
||||
%{_bindir}/miniterm.py
|
||||
%doc CHANGES.rst LICENSE.txt README.rst examples documentation/_build/*
|
||||
%{_bindir}/miniterm
|
||||
%{_bindir}/miniterm-%{py_ver}
|
||||
%ghost %{_sysconfdir}/alternatives/miniterm
|
||||
%{python_sitelib}/serial/
|
||||
%{python_sitelib}/pyserial-%{version}-py%{py_ver}.egg-info
|
||||
%{python_sitelib}/pyserial-%{version}-py*.egg-info
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user