From d308681a38c8917ffff588728fdd240d316ed67708b1a702b5529b136fc45526 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Mon, 3 Jul 2017 11:17:31 +0000 Subject: [PATCH] Accepting request 507531 from home:okurz:branches:devel:languages:python Convert to singlespec OBS-URL: https://build.opensuse.org/request/show/507531 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-attrs?expand=0&rev=5 --- python-attrs.changes | 5 +++++ python-attrs.spec | 31 ++++++++++++++++++++----------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/python-attrs.changes b/python-attrs.changes index f89db6c..e53eb4c 100644 --- a/python-attrs.changes +++ b/python-attrs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 1 14:53:33 UTC 2017 - okurz@suse.com + +- Convert to singlespec + ------------------------------------------------------------------- Tue Jul 5 17:20:56 UTC 2016 - hpj@urpla.net diff --git a/python-attrs.spec b/python-attrs.spec index 330f1e3..c5fcf9f 100644 --- a/python-attrs.spec +++ b/python-attrs.spec @@ -1,7 +1,7 @@ # # spec file for package python-attrs # -# 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,16 +16,22 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} + Name: python-attrs +%global modname attrs Version: 16.0.0 Release: 0 Summary: Attributes without boilerplate License: MIT Group: Development/Languages/Python -Url: https://github.com/hynek/attrs/ -Source: https://pypi.io/packages/source/a/attrs/attrs-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-pytest +Url: https://github.com/hynek/%{modname}/ +Source: https://pypi.io/packages/source/a/%{modname}/%{modname}-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +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()")} @@ -33,6 +39,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %endif +%python_subpackages + %description attrs is an MIT-licensed Python package with class decorators that ease the chores of implementing the most common attribute-related object protocols. @@ -54,18 +62,19 @@ life! python-attrs is the successor to python-characterstic %prep -%setup -q -n attrs-%{version} +%setup -q -n %{modname}-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%fdupes %{buildroot}%{_prefix} -%files +%files %{python_files} %defattr(-,root,root,-) %doc CHANGELOG.rst LICENSE README.rst -%{python_sitelib}/attr/ -%{python_sitelib}/attrs-%{version}-py*.egg-info +%{python_sitelib}/* +%{python_sitelib}/%{modname}-%{version}-py*.egg-info %changelog