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




commit 9b4bf0af9974aa55574126eb31e1f6b1d98caea1
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]