public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] scripts/glibcelf.py: Mark as UNSUPPORTED on Python 3.5 and earlier
@ 2022-04-22 17:36 Florian Weimer
  2022-04-25  7:17 ` Florian Weimer
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Weimer @ 2022-04-22 17:36 UTC (permalink / raw)
  To: libc-alpha

enum.IntFlag and enum.EnumMeta._missing_ support is not present in those
Python versions.

---
 scripts/glibcelf.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/glibcelf.py b/scripts/glibcelf.py
index 8f7d0ca184..da0d5380f3 100644
--- a/scripts/glibcelf.py
+++ b/scripts/glibcelf.py
@@ -28,6 +28,12 @@ import collections
 import enum
 import struct
 
+if not hasattr(enum, 'IntFlag'):
+    import sys
+    sys.stdout.write(
+        'warning: glibcelf.py needs Python 3.6 for enum support\n')
+    sys.exit(77)
+
 class _OpenIntEnum(enum.IntEnum):
     """Integer enumeration that supports arbitrary int values."""
     @classmethod


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-27 20:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22 17:36 [PATCH] scripts/glibcelf.py: Mark as UNSUPPORTED on Python 3.5 and earlier Florian Weimer
2022-04-25  7:17 ` Florian Weimer
2022-04-25 17:21   ` Adhemerval Zanella
2022-04-25 21:06     ` Florian Weimer
2022-04-26 13:19       ` Adhemerval Zanella
2022-04-27 20:45         ` Fangrui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).