From 3a5e0f8173aa76b2837740790900af934bde4c3ae4941527adfa2cf0782fb517 Mon Sep 17 00:00:00 2001 From: Todd R Date: Thu, 13 Jul 2017 15:45:59 +0000 Subject: [PATCH] Accepting request 510123 from home:TheBlackCat:branches:devel:languages:python Implement single-spec version OBS-URL: https://build.opensuse.org/request/show/510123 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sh?expand=0&rev=12 --- python-sh.changes | 5 +++++ python-sh.spec | 28 ++++++++++++++++++---------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/python-sh.changes b/python-sh.changes index 1a88ad2..669847e 100644 --- a/python-sh.changes +++ b/python-sh.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 13 15:29:32 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version. + ------------------------------------------------------------------- Mon Jun 12 15:34:12 UTC 2017 - aplanas@suse.com diff --git a/python-sh.spec b/python-sh.spec index 326136b..0c00c35 100644 --- a/python-sh.spec +++ b/python-sh.spec @@ -16,6 +16,8 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without test Name: python-sh Version: 1.12.14 Release: 0 @@ -25,9 +27,15 @@ Group: Development/Languages/Python Url: https://github.com/amoffat/sh Source: https://pypi.python.org/packages/source/s/sh/sh-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros +%if %{with test} +BuildRequires: %{python_module coverage} +%endif BuildArch: noarch -BuildRequires: python-coverage -BuildRequires: python-setuptools + +%python_subpackages %description sh is a full-fledged subprocess replacement for Python 2.6 - 3.6, PyPy @@ -43,21 +51,21 @@ sh is not a collection of system commands implemented in Python. %setup -q -n sh-%{version} %build -python setup.py build +%python_build %install -python setup.py install \ - --prefix=%{_prefix} \ - --root=%{buildroot} +%python_install +%if %{with test} %check -python test.py +%python_exec test.py +%endif -%files +%files %{python_files} %defattr(-,root,root) %doc CHANGELOG.md LICENSE.txt README.rst -%{python_sitelib}/sh.py -%{python_sitelib}/sh.pyc +%{python_sitelib}/sh.py* +%pycache_only %{python_sitelib}/__pycache__/sh.*py* %{python_sitelib}/sh-%{version}-*.egg-info %changelog