Fix relocate-preamble.py bug (issue 560840043 by knupero@gmail.com)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Fix relocate-preamble.py bug (issue 560840043 by knupero@gmail.com)

knupero
Reviewers: ,

Message:
Please review. See 'Re: Patchy email' thread in lilypond-devel.

Knut

Description:
Fix relocate-preamble.py bug

In relocate-preamble.py the search
path for python modules is changed.

If a python script / module used
in our regression tests is changed,
the results of "make test-baseline",
"make test" and patchy are random
without this patch: Fresh scripts
could load modules installed by an
older version of lilypond.

Please review this at https://codereview.appspot.com/560840043/

Affected files (+7, -0 lines):
   M python/relocate-preamble.py.in


Index: python/relocate-preamble.py.in
diff --git a/python/relocate-preamble.py.in b/python/relocate-preamble.py.in
index  
13bae3983145b7184ce83859f2faebd608a8da19..8896e8ca0f1187a7f67893862888c334daaa91a5  
100644
--- a/python/relocate-preamble.py.in
+++ b/python/relocate-preamble.py.in
@@ -16,4 +16,11 @@ bindir = os.path.abspath (os.path.dirname (sys.argv[0]))
  for p in ['share', 'lib']:
      datadir = os.path.abspath (bindir  
+ '/../%s/lilypond/current/python/' % p)
      sys.path.insert (0, datadir)
+
+# Python scripts executed during 'make test' and 'make test-baseline'
+# must use their own versions of the scripts and the files loaded by
+# those scripts. Assume to be in such a situation if the path to the
+# script ends with 'scripts/out'.
+if bindir.endswith (r'/scripts/out'):
+    sys.path.insert (0, bindir + r'/../../python/out')
  """



_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fix relocate-preamble.py bug (issue 560840043 by knupero@gmail.com)

Dev mailing list
LGTM, thanks!

https://codereview.appspot.com/560840043/

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel