From 7673c1f5228fc14258244f642c2350bb66900d8abefbde91d5c80ff796fa2356 Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 24 May 2017 17:01:39 +0000 Subject: [PATCH] Accepting request 498047 from home:TheBlackCat:branches:devel:languages:python - Implement single-spec version. - Fix source URL. OBS-URL: https://build.opensuse.org/request/show/498047 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-configobj?expand=0&rev=31 --- python-configobj.changes | 6 ++++++ python-configobj.spec | 33 ++++++++++++++++++++------------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/python-configobj.changes b/python-configobj.changes index c241fc6..06aedb8 100644 --- a/python-configobj.changes +++ b/python-configobj.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 24 17:01:11 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version. +- Fix source URL. + ------------------------------------------------------------------- Thu Sep 11 10:37:46 UTC 2014 - toddrme2178@gmail.com diff --git a/python-configobj.spec b/python-configobj.spec index b5a7ac5..bae6fa1 100644 --- a/python-configobj.spec +++ b/python-configobj.spec @@ -1,7 +1,7 @@ # # spec file for package python-configobj # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX Products 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,8 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define oldpython python Name: python-configobj Version: 5.0.6 Release: 0 @@ -23,19 +25,20 @@ Url: https://github.com/DiffSK/configobj Summary: Config file reading, writing and validation License: BSD-3-Clause Group: Development/Languages/Python -Source: http://pypi.python.org/packages/source/c/configobj/configobj-%{version}.tar.gz +Source: http://files.pythonhosted.org/packages/source/c/configobj/configobj-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel -BuildRequires: python-six +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module six} Requires: python-six # There are no real docs! -Provides: python-configobj-docs = %{version} -Obsoletes: python-configobj-docs < %{version} -%if 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 +%ifpython2 +Obsoletes: %{oldpython}-configobj-docs < %{version} +Provides: %{oldpython}-configobj-docs = %{version} %endif +BuildArch: noarch +%python_subpackages %description ConfigObj is a simple but powerful config file reader and writer: an ini @@ -60,16 +63,20 @@ It has lots of other features though: %setup -q -n configobj-%{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} -%files +%files %{python_files} %defattr(-,root,root,-) %{python_sitelib}/configobj.py* %{python_sitelib}/validate.py* %{python_sitelib}/_version.py* +%pycache_only %{python_sitelib}/__pycache__/configobj.*.py* +%pycache_only %{python_sitelib}/__pycache__/validate.*.py* +%pycache_only %{python_sitelib}/__pycache__/_version.*.py* %{python_sitelib}/configobj-%{version}-py*.egg-info %changelog