[gnome-music/wip/jfelder/python-3.7-check] meson: Music needs at least python 3.7




commit 40f12c2b4f258801e9e765269c176a17ad5a80e8
Author: Jean Felder <jfelder src gnome org>
Date:   Sun Mar 28 19:06:57 2021 +0200

    meson: Music needs at least python 3.7
    
    Post 3.38, Music is starting to use type checking. It relies on
    Postponed Evaluation of Annotations (PEP 563) which has been released
    in Python 3.7.
    
    Closes: #451

 meson.build | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/meson.build b/meson.build
index b7501435b..03bd09b4b 100644
--- a/meson.build
+++ b/meson.build
@@ -16,6 +16,11 @@ if not py_installation.found()
     error('No valid python3 binary found')
 endif
 
+# Python 3.7 is needed for postponed evalution of annotations
+if not py_installation.language_version().version_compare('>= 3.7')
+  error('Python 3.7 or newer is required.')
+endif
+
 # Constants
 PACKAGE_URL = 'https://wiki.gnome.org/Apps/Music'
 PACKAGE_URL_BUG = 'https://gitlab.gnome.org/GNOME/gnome-music/issues'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]