From 2fa61f45cf8384dd363777617f9c1163a1085a00629a8cbbad854e3111f35ab1 Mon Sep 17 00:00:00 2001 From: Todd R Date: Thu, 31 Aug 2017 17:15:02 +0000 Subject: [PATCH] Accepting request 519996 from devel:languages:python:singlespec-staging - Use progressbar-python3-relative-imports.patch on python2 and python3 since it is compatible with both. - Make progressbar-python3-relative-imports.patch simpler. - singlespec auto-conversion - Require python-setuptools instead of distribute (upstreams merged) - Update to 2.3+hg20121105.3c94a3a1ebe1 + See mercurial changes - python3 package added - slight spec improvement - license update: LGPL-2.1+ or BSD-3-Clause Look at License.txt - Add a %changelog line - Spec file cleanup: * Simplified macro mania * Removed unused build requirements * Set license to SDPX style (LGPL-3.0+) - initial version (2.3) OBS-URL: https://build.opensuse.org/request/show/519996 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-progressbar?expand=0&rev=17 --- progressbar-python3-relative-imports.patch | 8 +++---- python-progressbar.changes | 13 ++++++++++ python-progressbar.spec | 28 ++++++++++++---------- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/progressbar-python3-relative-imports.patch b/progressbar-python3-relative-imports.patch index 41f0aac..c6a6601 100644 --- a/progressbar-python3-relative-imports.patch +++ b/progressbar-python3-relative-imports.patch @@ -8,9 +8,9 @@ diff -ruN a/progressbar/__init__.py b/progressbar/__init__.py -from compat import * -from widgets import * -from progressbar import * -+from progressbar.compat import * -+from progressbar.widgets import * -+from progressbar.progressbar import * ++from .compat import * ++from .widgets import * ++from .progressbar import * Binärdateien a/progressbar/.__init__.py.swp and b/progressbar/.__init__.py.swp sind verschieden. diff -ruN a/progressbar/progressbar.py b/progressbar/progressbar.py --- a/progressbar/progressbar.py 2012-11-05 23:03:46.696882987 +0100 @@ -20,7 +20,7 @@ diff -ruN a/progressbar/progressbar.py b/progressbar/progressbar.py pass -import widgets -+from progressbar import widgets ++from . import widgets class UnknownLength: pass diff --git a/python-progressbar.changes b/python-progressbar.changes index 3af8ecb..ae99ce1 100644 --- a/python-progressbar.changes +++ b/python-progressbar.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Thu Aug 31 17:13:34 UTC 2017 - toddrme2178@gmail.com + +- Use progressbar-python3-relative-imports.patch on python2 and + python3 since it is compatible with both. +- Make progressbar-python3-relative-imports.patch simpler. + +------------------------------------------------------------------- +Thu Aug 24 13:49:59 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + ------------------------------------------------------------------- Thu Oct 24 11:10:20 UTC 2013 - speilicke@suse.com @@ -39,3 +51,4 @@ Thu Jun 16 20:08:05 CET 2011 - pascal.bleser@opensuse.org - initial version (2.3) + diff --git a/python-progressbar.spec b/python-progressbar.spec index 34d018c..16df311 100644 --- a/python-progressbar.spec +++ b/python-progressbar.spec @@ -1,7 +1,7 @@ # # spec file for package python-progressbar # -# Copyright (c) 2013 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,22 +16,23 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-progressbar Version: 2.3+hg20121105.3c94a3a1ebe1 +%define eggver 2.3 Release: 0 Summary: Text Progressbar Library for Python License: LGPL-2.1+ or BSD-3-Clause Group: Development/Libraries/Python -Url: http://code.google.com/p/python-progressbar/ +Url: https://github.com/niltonvolpato/python-progressbar Source: progressbar-%{version}.tar.bz2 -BuildRequires: python-devel -BuildRequires: python-setuptools -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 +Patch0: progressbar-python3-relative-imports.patch +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros BuildArch: noarch -%endif + +%python_subpackages %description This library provides a text mode progressbar. This is tipically used to @@ -40,18 +41,19 @@ processing is underway. %prep %setup -q -n progressbar +%patch0 -p1 sed -i "/\/usr\/bin\/python/d" progressbar/*.py # Correctly fix non-executable-script warning %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.txt README.txt examples.py %{python_sitelib}/progressbar/ -%{python_sitelib}/progressbar-2.3-py%{py_ver}.egg-info +%{python_sitelib}/progressbar-%{eggver}-py*.egg-info %changelog