Bug#981300: arduino-core-avr breaks arduino-mk

Carsten Schoenert c.schoenert at t-online.de
Mon Feb 1 19:35:54 GMT 2021


Hi again,

Am Mon, Feb 01, 2021 at 07:54:51PM +0100 schrieb Carsten Schoenert:
 
> > the problem tends to be getting arduino-mk updated, think last time it
> > needed a team upload (python3 fixes).
> 
> If you need help let me know, currently I can't that Python3 fixes you
> mean.

hrhr, I need to read my writing again before start sending this...

I meant here I can't see what fixes will get needed.

O.k., I quickly imported 1.6.0 and there is one more .py file added to
the bin/ folder.

Running 2to3 on the folder shows just small further needed adjustments.

$ 2to3-2.7 bin/*
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Refactored bin/ard-reset-arduino
--- bin/ard-reset-arduino	(original)
+++ bin/ard-reset-arduino	(refactored)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from __future__ import print_function
+
 import serial
 import os.path
 import argparse
RefactoringTool: Refactored bin/robotis-loader
--- bin/robotis-loader	(original)
+++ bin/robotis-loader	(refactored)
@@ -25,7 +25,7 @@
 def progressBar(percent, precision=65):
     threshold=precision*percent/100.0
     sys.stdout.write('[ ')
-    for x in xrange(0, precision):
+    for x in range(0, precision):
         if x < threshold: sys.stdout.write('#')
         else: sys.stdout.write(' ')
     sys.stdout.write(' ] ')
@@ -36,7 +36,7 @@
     stat = os.stat(binary)
     size = stat.st_size
     firmware = file(binary, 'rb')
-    print('* Opening %s, size=%d' % (binary, size))
+    print(('* Opening %s, size=%d' % (binary, size)))
 except:
     exit('! Unable to open file %s' % binary)
 
@@ -80,7 +80,7 @@
                 break
         print('')
         s.setDTR(True)
-        print('* Checksum: %d' % (cs))
+        print(('* Checksum: %d' % (cs)))
         s.write(chr(cs))
         print('* Firmware was sent')
     else:
@@ -91,4 +91,4 @@
             s.close()
             exit()
         else:
-            print('Board -> '+line)
+            print(('Board -> '+line))
RefactoringTool: Files that need to be modified:
RefactoringTool: bin/ard-reset-arduino
RefactoringTool: bin/robotis-loader

Seems doable without big headaches. Let me know how you like to proceed.

Regards
Carsten



More information about the debian-science-maintainers mailing list