[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#912495: pydxcluster: Please migrate to python3-pygame



Control: tags -1 + patch

Hi,

I attached a patch that ports pydxcluster to Python 3.
Though I did some testing with the UI, I'm not very familiar
with the program. It would be good if someone could verify
the functionality before applying+uploading the patch (especially
the network functionality which I could not test at all).

Kind regards,
 Reiner
diff --git a/debian/control b/debian/control
index 3457ac6..749a252 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Homepage: https://sourceforge.net/projects/pydxcluster/
 
 Package: pydxcluster
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends},python,python-tk,python-requests,python-xmltodict,python-pygame
+Depends: ${shlibs:Depends}, ${misc:Depends},python3,python3-tk,python3-requests,python3-xmltodict,python3-pygame
 Description: HAM Dx Cluster for Linux users
  Allows users to connect to cluster, reverse beacon and PSKReporter servers.
  Also supports sending spots, band selecting and is integrated with
diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch
new file mode 100644
index 0000000..2b58340
--- /dev/null
+++ b/debian/patches/python3.patch
@@ -0,0 +1,53 @@
+Author: Reiner Herrmann <reiner@reiner-h.de>
+Descriptions: Port to Python 3
+Bug-Debian: https://bugs.debian.org/912495
+
+--- a/pyDxCluster_v2_21.py
++++ b/pyDxCluster_v2_21.py
+@@ -1,16 +1,16 @@
+-#!/usr/bin/python
++#!/usr/bin/python3
+ #coding:utf-8
+ ###################################################################################
+ ########################### PyDX Cluster v1.2 by HA1EM x###########################
+ ###################################################################################
+ 
+ ###################################################################################
+-from Tkinter import *
++from tkinter import *
+ import telnetlib, string, sys, os, subprocess, re
+ import requests
+ import pygame
+ 
+-from tkColorChooser import askcolor 
++from tkinter.colorchooser import askcolor 
+ from math import pi, sin, cos, atan2, sqrt, radians, log, tan, degrees
+ #debian additions
+ from os.path import expanduser
+@@ -249,7 +249,7 @@
+ 	
+ 
+ def f(z):
+-    return 10**(-(z-1)/2)*24**(-z/2)
++    return 10**(-(z-1)//2)*24**(-z//2)
+ def locator_to_latlong (locator):
+ 	global safety
+ 	locator = locator.upper()
+@@ -513,7 +513,7 @@
+ 							respone=rb.read_until("\n",4)
+ 							reverseanswer=len(respone)
+ 						except:
+-							print "Timeout"
++							print("Timeout")
+ 
+ 
+ 						if "ERROR" in respone:
+@@ -1149,7 +1149,7 @@
+ 
+ 
+ def help():
+-	print
++	print()
+ 	
+ 	
+ def about():
diff --git a/debian/patches/series b/debian/patches/series
index 80a60eb..6f4027a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 01-file-loc.diff
+python3.patch

Attachment: signature.asc
Description: PGP signature


Reply to: