Accepting request 489403 from home:TheBlackCat:branches:devel:languages:python

Implement single-spec version.

OBS-URL: https://build.opensuse.org/request/show/489403
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pexpect?expand=0&rev=23
This commit is contained in:
Thomas Bechtold 2017-04-20 05:39:49 +00:00 committed by Git OBS Bridge
parent 3b0cff319c
commit eb770e4898
2 changed files with 27 additions and 14 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Apr 19 17:57:01 UTC 2017 - toddrme2178@gmail.com
- Implement single-spec version.
-------------------------------------------------------------------
Thu Sep 15 22:52:06 UTC 2016 - toddrme2178@gmail.com

View File

@ -1,7 +1,7 @@
#
# spec file for package python-pexpect
#
# 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,9 @@
#
%bcond_with tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pexpect
Version: 4.2.1
Release: 0
@ -24,17 +27,17 @@ License: ISC
Group: Development/Libraries/Python
Url: http://pexpect.readthedocs.org/en/latest/
Source: https://files.pythonhosted.org/packages/source/p/pexpect/pexpect-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: man
BuildRequires: python-ptyprocess
BuildRequires: python-pytest
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module ptyprocess}
%if %{with tests}
BuildRequires: %{python_module pytest}
%endif
Requires: python-ptyprocess
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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()")}
%else
BuildArch: noarch
%endif
%python_subpackages
%description
Pexpect is a pure Python module for spawning child applications;
@ -44,18 +47,23 @@ controlling them; and responding to expected patterns in their output.
%setup -n pexpect-%{version}
%build
python setup.py build
%python_build
%install
python setup.py install --prefix="/usr" --root=%{buildroot}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with tests}
%check
export LANG=en_US.UTF-8
py.test
%python_expand py.test-%{$python_bun_suffix}
%endif
%files
%files %{python_files}
%defattr(-,root,root,-)
%doc doc examples LICENSE
%doc LICENSE
%doc doc/
%doc examples/
%{python_sitelib}/pexpect/
%{python_sitelib}/pexpect-%{version}-py*.egg-info