From 2307ba2027b478499b1c6366fc3085300d0a192eb1252e4935288f7772715541 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Thu, 16 Mar 2017 14:53:27 +0000 Subject: [PATCH] Accepting request 480649 from home:tbechtold:branches:devel:languages:python - Switch to singlespec approach OBS-URL: https://build.opensuse.org/request/show/480649 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pretend?expand=0&rev=4 --- python-pretend.changes | 5 +++++ python-pretend.spec | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/python-pretend.changes b/python-pretend.changes index 4567b5b..a81a3a9 100644 --- a/python-pretend.changes +++ b/python-pretend.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 16 14:48:02 UTC 2017 - tbechtold@suse.com + +- Switch to singlespec approach + ------------------------------------------------------------------- Mon Mar 31 14:59:55 UTC 2014 - speilicke@suse.com diff --git a/python-pretend.spec b/python-pretend.spec index f71dd6c..9f25008 100644 --- a/python-pretend.spec +++ b/python-pretend.spec @@ -1,7 +1,7 @@ # # spec file for package python-pretend # -# Copyright (c) 2014 SUSE LINUX Products 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,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pretend Version: 1.0.8 Release: 0 @@ -23,15 +24,14 @@ Summary: A library for stubbing in Python License: BSD-3-Clause Group: Development/Languages/Python Url: https://github.com/alex/pretend -Source: https://pypi.python.org/packages/source/p/pretend/pretend-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +Source: https://pypi.io/packages/source/p/pretend/pretend-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros 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 Pretend is a library to make stubbing with Python easier. @@ -40,12 +40,12 @@ Pretend is a library to make stubbing with Python easier. %setup -q -n pretend-%{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 LICENSE.rst README.rst %{python_sitelib}/*