Hello community, here is the log from the commit of package python-pmw for openSUSE:Factory checked in at 2017-08-24 18:46:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pmw (Old) and /work/SRC/openSUSE:Factory/.python-pmw.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pmw" Thu Aug 24 18:46:10 2017 rev:11 rq:514588 version:2.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pmw/python-pmw.changes 2014-03-30 12:25:51.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-pmw.new/python-pmw.changes 2017-08-24 18:46:26.551741475 +0200 @@ -1,0 +2,12 @@ +Sun May 7 20:06:55 UTC 2017 - [email protected] + +- Add py36.patch: Fix for python3.6 + * https://sourceforge.net/p/pmw/patches/7/ + +------------------------------------------------------------------- +Sat May 6 23:47:52 UTC 2017 - [email protected] + +- update to Pmw 2.0.1 +- add python3 compatibility + +------------------------------------------------------------------- Old: ---- python-pmw-1.3.3b.tar.bz2 New: ---- Pmw-2.0.1.tar.gz py36.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pmw.spec ++++++ --- /var/tmp/diff_new_pack.G8AnQh/_old 2017-08-24 18:46:27.823562399 +0200 +++ /var/tmp/diff_new_pack.G8AnQh/_new 2017-08-24 18:46:27.847559020 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-pmw # -# 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,27 +16,26 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define oldpython python Name: python-pmw -Version: 1.3.3b +Version: 2.0.1 Release: 0 Url: http://pmw.sourceforge.net/ Summary: High-level compound widgets in Python using the Tkinter module +#PATCH-FIX-UPSTREAM py36.patch https://sourceforge.net/p/pmw/patches/7/ License: MIT -Group: Development/Libraries/Python -Source: %{name}-%{version}.tar.bz2 +Group: Development/Languages/Python +Patch: py36.patch +Source: https://pypi.python.org/packages/e7/20/8d0c4ba96a5fe62e1bcf2b8a212ccfecd67ad951e8f3e89cf147d63952aa/Pmw-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel +BuildRequires: %{python_module base} +BuildRequires: python-rpm-macros Requires: python-tk -%if 0%{?suse_version} -%py_requires -%if 0%{?suse_version} > 1010 BuildRequires: fdupes -%endif -%if 0%{?suse_version} > 1110 BuildArch: noarch -%endif -%endif -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +%python_subpackages %description A toolkit for building high-level compound widgets in Python using the Tkinter @@ -45,20 +44,20 @@ dialog windows. %prep -%setup -q -n %{name}-%{version}/src +%setup -q -n Pmw-%{version} +%patch sed -i '1d' Pmw/Pmw_1_3_3/{demos/All,bin/bundlepmw,tests/All,tests/ManualTests}.py # Fix non-executable scripts +sed -i '1d' Pmw/Pmw_2_0_1/{demos/All,bin/bundlepmw,tests/All,tests/ManualTests}.py # Fix non-executable scripts %build -python setup.py build +%python_build %install -python setup.py install --root=%{buildroot} --prefix=%{_prefix} -%if 0%{?suse_version} > 1010 +%python_install %fdupes %{buildroot}/%{_prefix} -%endif -%files -%defattr(-,root,root) +%files %python_files +%defattr(-,root,root,-) %{python_sitelib}/* %changelog ++++++ py36.patch ++++++ diff -ur Pmw/Pmw_2_0_1.orig/bin/bundlepmw.py Pmw/Pmw_2_0_1/bin/bundlepmw.py --- Pmw/Pmw_2_0_1.orig/bin/bundlepmw.py 2012-08-04 00:56:51.000000000 +0000 +++ Pmw/Pmw_2_0_1/bin/bundlepmw.py 2017-05-07 19:57:25.954264305 +0000 @@ -11,7 +11,6 @@ import os import re -import string import sys # The order of these files is significant. Files which reference @@ -66,7 +65,7 @@ dir = expandLinks(dir) dir = os.path.basename(dir) -version = string.replace(dir[4:], '_', '.') +version = dir[4:].replace('_', '.') # Code to import the Color module. colorCode = """ @@ -147,7 +146,8 @@ # Specially handle PmwBase.py file: text = mungeFile('Base') -text = re.sub('import PmwLogicalFont', '', text) +text = re.sub('from . import PmwBlt', 'PmwBlt = Blt', text) +text = re.sub('from . import PmwLogicalFont', '', text) text = re.sub('PmwLogicalFont._font_initialise', '_font_initialise', text) outfile.write(text) if not needBlt: diff -ur Pmw/Pmw_2_0_1.orig/lib/PmwColor.py Pmw/Pmw_2_0_1/lib/PmwColor.py --- Pmw/Pmw_2_0_1.orig/lib/PmwColor.py 2013-02-26 13:01:23.000000000 +0000 +++ Pmw/Pmw_2_0_1/lib/PmwColor.py 2017-05-07 19:59:51.116891121 +0000 @@ -10,7 +10,7 @@ _TWO_PI = _PI * 2 _THIRD_PI = _PI / 3 _SIXTH_PI = _PI / 6 -_MAX_RGB = float(256 * 256 - 1) # max size of rgb values returned from Tk +_MAX_RGB = 256 * 256 - 1 # max size of rgb values returned from Tk def setscheme(root, background=None, **kw): root = root._root() @@ -346,13 +346,13 @@ lightRGB = [] darkRGB = [] for value in name2rgb(root, colorName, 1): - value40pc = (14 * value) / 10 + value40pc = (14 * value) // 10 if value40pc > _MAX_RGB: value40pc = _MAX_RGB - valueHalfWhite = (_MAX_RGB + value) / 2; + valueHalfWhite = (_MAX_RGB + value) // 2; lightRGB.append(max(value40pc, valueHalfWhite)) - darkValue = (60 * value) / 100 + darkValue = (60 * value) // 100 darkRGB.append(darkValue) return (
