From a6880007cbbdfebd421ef37df14a7b4be641920fd6f205751cc7a8ee62a80682 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 16 May 2017 15:57:49 +0000 Subject: [PATCH 1/2] - convert to singlespec packaging OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-betamax?expand=0&rev=7 --- python-betamax.changes | 5 +++++ python-betamax.spec | 18 ++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/python-betamax.changes b/python-betamax.changes index bc97f8f..3c9a627 100644 --- a/python-betamax.changes +++ b/python-betamax.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 16 15:57:27 UTC 2017 - dmueller@suse.com + +- convert to singlespec packaging + ------------------------------------------------------------------- Tue Nov 15 10:34:38 UTC 2016 - dmueller@suse.com diff --git a/python-betamax.spec b/python-betamax.spec index 8cbde36..814c0f2 100644 --- a/python-betamax.spec +++ b/python-betamax.spec @@ -1,7 +1,7 @@ # # spec file for package python-betamax # -# 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 @@ -24,15 +24,13 @@ License: Apache-2.0 Group: Development/Languages/Python Url: https://github.com/sigmavirus24/betamax Source: https://pypi.io/packages/source/b/betamax/betamax-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: %{python_module requests} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros Requires: python-requests >= 2.0 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 Betamax is a VCR_ imitation for requests. This will make mocking out requests @@ -42,12 +40,12 @@ much easier. %setup -q -n betamax-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install -%files +%files %{python_files} %defattr(-,root,root,-) %doc AUTHORS.rst LICENSE README.rst %{python_sitelib}/* From de5d41b8695e60c236df6a77b3636cd2ba827ed9f7ec77ec8ef9bccb97b4ecae Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 16 May 2017 16:00:24 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-betamax?expand=0&rev=8 --- python-betamax.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-betamax.spec b/python-betamax.spec index 814c0f2..7c5d901 100644 --- a/python-betamax.spec +++ b/python-betamax.spec @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-betamax Version: 0.8.0 Release: 0 @@ -24,7 +25,6 @@ License: Apache-2.0 Group: Development/Languages/Python Url: https://github.com/sigmavirus24/betamax Source: https://pypi.io/packages/source/b/betamax/betamax-%{version}.tar.gz -BuildRequires: %{python_module requests} BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros Requires: python-requests >= 2.0