Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (4)
Move some patch chunks to the correct patch file
· e91d5963
Andreas Tille
authored
Sep 23, 2019
e91d5963
Revert port to Python3
· 8d90d912
Andreas Tille
authored
Sep 23, 2019
8d90d912
Warn about future removal at login screen and in NEWS.Debian
· 8033e1f7
Andreas Tille
authored
Sep 23, 2019
8033e1f7
Revert Build-System to Python2
· a33a53ff
Andreas Tille
authored
Sep 23, 2019
a33a53ff
Show whitespace changes
Inline
Side-by-side
debian/NEWS.Debian
View file @
a33a53ff
cycle (0.3.1-1
6
) unstable; urgency=medium
Cycle
was converted to Python3 by the Debian Med team since
Python2 will be removed from Debian 11.
If you notice
an
y
i
ssues that might be connected to this conversion
please do
reportbug cycle
to
l
et
us know
.
-- Andreas Tille <tille@debian.org>
Wed, 11
Sep 2019
15:32:06
+0200
cycle (0.3.1-1
7
) 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 Debi
an i
f 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
g
et
it fully working
.
-- Andreas Tille <tille@debian.org>
Mon, 23
Sep 2019
09:31:51
+0200
debian/changelog
View file @
a33a53ff
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@debian.org> Mon, 23 Sep 2019 09:31:51 +0200
cycle (0.3.1-16) unstable; urgency=medium
* Team upload.
...
...
debian/control
View file @
a33a53ff
...
...
@@ -4,7 +4,7 @@ Uploaders: Miriam Ruiz <miriam@debian.org>
Section: utils
Priority: optional
Build-Depends: debhelper-compat (= 12)
Build-Depends-Indep: python
3
,
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: ${python
3
:Depends},
Depends: ${python:Depends},
${misc:Depends},
python
3
-wxgtk
4
.0
python-wxgtk
3
.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
View file @
a33a53ff
...
...
@@ -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 → 100644
View file @
a33a53ff
Description: Revert to Python2 as requested but warn users about future removal
Bug-Debian: https://bugs.debian.org/940902
Author: Andreas Tille <tille@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
View file @
a33a53ff
...
...
@@ -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
View file @
a33a53ff
...
...
@@ -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
View file @
a33a53ff
...
...
@@ -4,7 +4,7 @@
#export DH_VERBOSE=1
%:
dh $@ --with python
3
--buildsystem=pybuild
dh $@ --with python
2
--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