Created
September 23, 2019 16:23
-
-
Save MasterOdin/8141656b872682a3a540f7af4a1c0d9f to your computer and use it in GitHub Desktop.
lilypond make check patches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 0bae5587888cd251a14bd9068658a21fc7ba7ad2 Mon Sep 17 00:00:00 2001 | |
From: Matthew Peveler <[email protected]> | |
Date: Mon, 23 Sep 2019 12:18:39 -0300 | |
Subject: [PATCH 1/2] add __lt__ method for py2 old style class sort compat | |
--- | |
scripts/build/output-distance.py | 6 ++++++ | |
1 file changed, 6 insertions(+) | |
diff --git a/scripts/build/output-distance.py b/scripts/build/output-distance.py | |
index f9c73fce0c..925c30ea28 100755 | |
--- a/scripts/build/output-distance.py | |
+++ b/scripts/build/output-distance.py | |
@@ -148,6 +148,9 @@ class GrobSignature: | |
self.bbox = (bbox_x, bbox_y) | |
self.centroid = (bbox_x[0] + bbox_x[1], bbox_y[0] + bbox_y[1]) | |
+ def __lt__ (self, other): | |
+ return id(self) < id(other) | |
+ | |
def __repr__ (self): | |
return '%s: (%.2f,%.2f), (%.2f,%.2f)\n' % (self.name, | |
self.bbox[0][0], | |
@@ -353,6 +356,9 @@ class FileLink: | |
self._distance = None | |
self.file_names = (f1, f2) | |
+ def __lt__ (self, other): | |
+ return id(self) < id(other) | |
+ | |
def text_record_string (self): | |
return '%-30f %-20s\n' % (self.distance (), | |
self.name () | |
-- | |
2.23.0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 4c89360bb48a67cdc222c6c9c5af10f26875b902 Mon Sep 17 00:00:00 2001 | |
From: Matthew Peveler <[email protected]> | |
Date: Mon, 23 Sep 2019 12:18:59 -0300 | |
Subject: [PATCH 2/2] read midi files as binary | |
--- | |
scripts/build/output-distance.py | 3 ++- | |
1 file changed, 2 insertions(+), 1 deletion(-) | |
diff --git a/scripts/build/output-distance.py b/scripts/build/output-distance.py | |
index 925c30ea28..c95e419f37 100755 | |
--- a/scripts/build/output-distance.py | |
+++ b/scripts/build/output-distance.py | |
@@ -572,7 +572,8 @@ class MidiFileLink (TextFileCompareLink): | |
def get_content (self, oldnew): | |
import midi | |
- data = FileCompareLink.get_content (self, oldnew) | |
+ print('reading', oldnew) | |
+ data = open (oldnew, 'rb').read () | |
midi = midi.parse (data) | |
tracks = midi[1] | |
-- | |
2.23.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment