diff --git a/python-ptyprocess.changes b/python-ptyprocess.changes index 4c81dec..568bd38 100644 --- a/python-ptyprocess.changes +++ b/python-ptyprocess.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 19 17:57:26 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version. + ------------------------------------------------------------------- Tue Nov 15 10:59:54 UTC 2016 - dmueller@suse.com diff --git a/python-ptyprocess.spec b/python-ptyprocess.spec index ff2d3f0..dbf1432 100644 --- a/python-ptyprocess.spec +++ b/python-ptyprocess.spec @@ -1,7 +1,7 @@ # # spec file for package python-ptyprocess # -# 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_without tests + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-ptyprocess Version: 0.5.1 Release: 0 @@ -23,16 +26,17 @@ Summary: Run a subprocess in a pseudo terminal License: ISC Group: Development/Languages/Python Url: https://github.com/pexpect/ptyprocess -Source: https://pypi.io/packages/source/p/ptyprocess/ptyprocess-%{version}.tar.gz -BuildRequires: python-devel >= 2.7 -BuildRequires: python-nose -BuildRequires: python-setuptools -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 +Source: https://files.pythonhosted.org/packages/source/p/ptyprocess/ptyprocess-%{version}.tar.gz +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +%if %{with tests} +BuildRequires: %{python_module nose} %endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +%python_subpackages %description Launch a subprocess in a pseudo terminal (pty), and interact with both the @@ -48,15 +52,18 @@ If you need to automate these things, running the process in a pseudo terminal %setup -q -n ptyprocess-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%if %{with tests} %check -nosetests +%python_expand nosetests-%{$python_bin_suffix} +%endif -%files +%files %{python_files} %defattr(-,root,root,-) %doc README.rst %{python_sitelib}/*