[med-svn] [Git][med-team/cycle][master] 4 commits: Move some patch chunks to the correct patch file

Andreas Tille gitlab at salsa.debian.org
Mon Sep 23 09:11:02 BST 2019



Andreas Tille pushed to branch master at Debian Med / cycle


Commits:
e91d5963 by Andreas Tille at 2019-09-23T07:26:35Z
Move some patch chunks to the correct patch file

- - - - -
8d90d912 by Andreas Tille at 2019-09-23T07:32:30Z
Revert port to Python3

- - - - -
8033e1f7 by Andreas Tille at 2019-09-23T07:37:50Z
Warn about future removal at login screen and in NEWS.Debian

- - - - -
a33a53ff by Andreas Tille at 2019-09-23T07:47:28Z
Revert Build-System to Python2

- - - - -


8 changed files:

- debian/NEWS.Debian
- debian/changelog
- debian/control
- debian/patches/2to3.patch
- + debian/patches/python2_removal_warning.patch
- debian/patches/python3_migration_warning.patch
- debian/patches/series
- debian/rules


Changes:

=====================================
debian/NEWS.Debian
=====================================
@@ -1,13 +1,13 @@
-cycle (0.3.1-16) unstable; urgency=medium
-
-  Cycle was converted to Python3 by the Debian Med team since
-  Python2 will be removed from Debian 11.
-  If you notice any issues that might be connected to this conversion
-  please do
-
-     reportbug cycle
-
-  to let us know.
-
- -- Andreas Tille <tille at debian.org>  Wed, 11 Sep 2019 15:32:06 +0200
+cycle (0.3.1-17) unstable; urgency=medium
+
+  Cycle is Python2 which is End Of Life at 2020-01-01 and will
+  not be part of Debian 11 any more.  So this package needs to
+  be removed from Debian if there is no working Python3 port.
+  The attempt of the Debian Med team to provide a Python3 port
+  failed (see bug #940902).  If you are interested to continue
+  using this program please check the existing patch at
+     https://salsa.debian.org/med-team/cycle/blob/master/debian/patches/2to3.patch
+  and try to get it fully working.
+
+ -- Andreas Tille <tille at debian.org>  Mon, 23 Sep 2019 09:31:51 +0200
 


=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+cycle (0.3.1-17) UNRELEASED; urgency=medium
+
+  * Team upload
+  * Revert port to Python3
+    Closes: #940902
+  * Warn about future removal at login screen and in NEWS.Debian
+
+ -- Andreas Tille <tille at debian.org>  Mon, 23 Sep 2019 09:31:51 +0200
+
 cycle (0.3.1-16) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -4,7 +4,7 @@ Uploaders: Miriam Ruiz <miriam at debian.org>
 Section: utils
 Priority: optional
 Build-Depends: debhelper-compat (= 12)
-Build-Depends-Indep: python3,
+Build-Depends-Indep: python,
                      dh-python
 Standards-Version: 4.4.0
 Vcs-Browser: https://salsa.debian.org/med-team/cycle
@@ -13,9 +13,9 @@ Homepage: http://cycle.sourceforge.net/
 
 Package: cycle
 Architecture: all
-Depends: ${python3:Depends},
+Depends: ${python:Depends},
          ${misc:Depends},
-         python3-wxgtk4.0
+         python-wxgtk3.0
 Description: calendar program for women
  Cycle is a calendar for women. Given a cycle length or statistics for
  several periods, it can calculate the days until menstruation, the days


=====================================
debian/patches/2to3.patch
=====================================
@@ -2611,7 +2611,7 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
  
                  # Generate nr "random" initial positions and "random"
                  # en/decrypt rotors from id_rotor.
-@@ -155,7 +155,7 @@ class newrotor(object):
+@@ -155,12 +155,12 @@ class newrotor(object):
                  E = []
                  D = []
                  positions = []
@@ -2620,6 +2620,12 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
                      i = size
                      positions.append(rand(i))
                      erotor = id_rotor[:]
+                     drotor = id_rotor[:]
+-                    drotor[i] = erotor[i] = 1 + 2*rand(i/2) # increment
++                    drotor[i] = erotor[i] = 1 + 2*rand(i//2) # increment
+                     while i > 1:
+                         r = rand(i)
+                         i -= 1
 @@ -184,7 +184,7 @@ def random_func(key):
      x=995
      y=576
@@ -2629,6 +2635,19 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
          x = (((x<<3 | x>>13) + c) & mask)
          y = (((y<<3 | y>>13) ^ c) & mask)
          z = (((z<<3 | z>>13) - c) & mask)
+@@ -200,9 +200,9 @@ def random_func(key):
+ 
+     # Oh, dear, for compatibility, we must evaluate the first seed transition
+     # the hard way, later it becomes much simpler
+-    x = 171 * (x % 177) - 2  * (x/177)
+-    y = 172 * (y % 176) - 35 * (y/176)
+-    z = 170 * (z % 178) - 63 * (z/178)
++    x = 171 * (x % 177) - 2  * (x//177)
++    y = 172 * (y % 176) - 35 * (y//176)
++    z = 170 * (z % 178) - 63 * (z//178)
+     if x < 0: x += 30269
+     if y < 0: y += 30307
+     if z < 0: z += 30323
 --- a/save_load.py
 +++ b/save_load.py
 @@ -1,10 +1,10 @@
@@ -2688,7 +2707,7 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
 -    tmp=rt.encrypt( 'Cycle'+cPickle.dumps(objSave) )
 -    tmp="UserName="+cPickle.dumps(name)+"==="+tmp
 +    tmp=rt.encrypt( b'Cycle'+pickle.dumps(objSave) )
-+    tmp="UserName="+pickle.dumps(name)+"==="+tmp
++    tmp=b"UserName="+pickle.dumps(name)+b"==="+tmp
      p, f_name=get_f_name(file)
  
      if not os.path.exists(p):


=====================================
debian/patches/python2_removal_warning.patch
=====================================
@@ -0,0 +1,20 @@
+Description: Revert to Python2 as requested but warn users about future removal
+Bug-Debian: https://bugs.debian.org/940902
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Mon, 23 Sep 2019 09:31:51 +0200
+
+--- a/dialogs.py
++++ b/dialogs.py
+@@ -325,7 +325,11 @@ def ask_name(parent=None):
+         "like HIV/AIDS.\n\nIt is just an electronic means of keeping track\n"
+         "of some of your medical data and extracting some statistical\n"
+         "conclusions from them. You cannot consider this program as a\n"
+-        "substitute for your gynecologist in any way."))
++        "substitute for your gynecologist in any way.\n\n"
++        "Please also note: This program is coded in Python2 which is End Of Life\n"
++        "since 2020-01-01.  The Python3 port by the Debian Med team leaded to errors\n"
++        "see https://bugs.debian.org/940902.  Please join the effort to provide a\n"
++        "working Python3 port to make sure cycle will remain in Debian 11!"))
+     dlg = wx.TextEntryDialog(parent, _('Enter your name:'),_('New user'),'',
+ 	 style=wx.OK | wx.CANCEL)
+     while dlg.ShowModal()==wx.ID_OK:


=====================================
debian/patches/python3_migration_warning.patch
=====================================
@@ -18,38 +18,3 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
      dlg = wx.TextEntryDialog(parent, _('Enter your name:'),_('New user'),'',
           style=wx.OK | wx.CANCEL)
      while dlg.ShowModal()==wx.ID_OK:
---- a/p_rotor.py
-+++ b/p_rotor.py
-@@ -160,7 +160,7 @@ class newrotor(object):
-                     positions.append(rand(i))
-                     erotor = id_rotor[:]
-                     drotor = id_rotor[:]
--                    drotor[i] = erotor[i] = 1 + 2*rand(i/2) # increment
-+                    drotor[i] = erotor[i] = 1 + 2*rand(i//2) # increment
-                     while i > 1:
-                         r = rand(i)
-                         i -= 1
-@@ -200,9 +200,9 @@ def random_func(key):
- 
-     # Oh, dear, for compatibility, we must evaluate the first seed transition
-     # the hard way, later it becomes much simpler
--    x = 171 * (x % 177) - 2  * (x/177)
--    y = 172 * (y % 176) - 35 * (y/176)
--    z = 170 * (z % 178) - 63 * (z/178)
-+    x = 171 * (x % 177) - 2  * (x//177)
-+    y = 172 * (y % 176) - 35 * (y//176)
-+    z = 170 * (z % 178) - 63 * (z//178)
-     if x < 0: x += 30269
-     if y < 0: y += 30307
-     if z < 0: z += 30323
---- a/save_load.py
-+++ b/save_load.py
-@@ -44,7 +44,7 @@ def Save_Cycle(name='cycle', passwd='123
-         objSave.append(['colour', [d, cal_year.cycle.colour_set[d].Get()] ])
- 
-     tmp=rt.encrypt( b'Cycle'+pickle.dumps(objSave) )
--    tmp="UserName="+pickle.dumps(name)+"==="+tmp
-+    tmp=b"UserName="+pickle.dumps(name)+b"==="+tmp
-     p, f_name=get_f_name(file)
- 
-     if not os.path.exists(p):


=====================================
debian/patches/series
=====================================
@@ -10,5 +10,6 @@
 06b_enter_your_name.patch
 07_wxpython3.0.patch
 wxclientsize.patch
-2to3.patch
-python3_migration_warning.patch
+#2to3.patch
+#python3_migration_warning.patch
+python2_removal_warning.patch


=====================================
debian/rules
=====================================
@@ -4,7 +4,7 @@
 #export DH_VERBOSE=1
 
 %:
-	dh $@ --with python3 --buildsystem=pybuild
+	dh $@ --with python2 --buildsystem=pybuild
 
 override_dh_auto_build:
 	dh_auto_build
@@ -18,5 +18,8 @@ override_dh_install:
 	dh_install
 	cd debian/msg; make install DESTDIR=../cycle/usr/share/locale/
 
-override_dh_python3:
-	dh_python3 --no-ext-rename
+override_dh_python2:
+	dh_python2
+	# the code is installed to /usr/share/cycle - no idea why there is a copy of the main program in /usr/lib/python2.7
+	rm -rf debian/*/usr/lib/python*
+	find debian -name "lib" -type d -empty | xargs rmdir



View it on GitLab: https://salsa.debian.org/med-team/cycle/compare/36092029a80bf1dd5a9e74043a1df06450bd52ad...a33a53ffbdd8161c63e1012c9b647c591a1ce572

-- 
View it on GitLab: https://salsa.debian.org/med-team/cycle/compare/36092029a80bf1dd5a9e74043a1df06450bd52ad...a33a53ffbdd8161c63e1012c9b647c591a1ce572
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190923/98dbe19d/attachment-0001.html>


More information about the debian-med-commit mailing list