forked from pool/python-pmw
- update to 2.1.1:
* merge some bugfixes and mods for Python 3 support - drop py36.patch (upstream) -Pmw import OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pmw?expand=0&rev=20
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0b9d28f52755a7a081b44591c3dd912054f896e56c9a627db4dd228306ad1120
|
||||
size 830448
|
||||
3
Pmw-2.1.1.tar.gz
Normal file
3
Pmw-2.1.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:948412457cfccf0c775dd08e0913fb00f90896a33c79737d571c7312aeaf55c6
|
||||
size 1077119
|
||||
59
py36.patch
59
py36.patch
@@ -1,59 +0,0 @@
|
||||
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 (
|
||||
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 9 21:26:14 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 2.1.1:
|
||||
* merge some bugfixes and mods for Python 3 support
|
||||
- drop py36.patch (upstream)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 7 11:47:08 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
@@ -51,5 +58,5 @@ Tue May 10 19:00:49 UTC 2011 - dhall@wustl.edu
|
||||
-------------------------------------------------------------------
|
||||
Tue May 10 18:41:49 UTC 2011 - dhall@wustl.edu
|
||||
|
||||
-Pmw import
|
||||
-Pmw import
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pmw
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -19,15 +19,13 @@
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define oldpython python
|
||||
Name: python-pmw
|
||||
Version: 2.0.1
|
||||
Version: 2.1.1
|
||||
Release: 0
|
||||
Summary: High-level compound widgets in Python using the Tkinter module
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: http://pmw.sourceforge.net/
|
||||
URL: https://pmw.sourceforge.net/
|
||||
Source: https://files.pythonhosted.org/packages/source/P/Pmw/Pmw-%{version}.tar.gz
|
||||
#PATCH-FIX-UPSTREAM py36.patch https://sourceforge.net/p/pmw/patches/7/
|
||||
Patch0: py36.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -46,10 +44,9 @@ notebooks, comboboxes, selection widgets, paned widgets, scrolled widgets and
|
||||
dialog windows.
|
||||
|
||||
%prep
|
||||
%setup -q -n Pmw-%{version}
|
||||
%patch0
|
||||
%autosetup -p1 -n Pmw-%{version}
|
||||
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
|
||||
sed -i '1d' Pmw/Pmw_2_1_1/{demos/All,bin/bundlepmw,tests/All,tests/ManualTests}.py # Fix non-executable scripts
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
Reference in New Issue
Block a user