From 7baa918b3f946a27f39fd1d99c2e6a4499c4a20c Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 14 Nov 2019 15:10:01 +0000 Subject: [PATCH] Remove Python 2 support Python 2 is going to reach EOL in January 2020, and most platforms have already moved to Python 3. --- configure.ac | 2 +- include/epoxy/meson.build | 1 - meson.build | 6 ------ src/gen_dispatch.py | 1 + src/meson.build | 1 - 5 files changed, 2 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index b0bb452..63ad8ee 100644 --- a/configure.ac +++ b/configure.ac @@ -41,7 +41,7 @@ m4_ifndef([XORG_MACROS_VERSION], XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS -AC_CHECK_PROGS([PYTHON], [python3 python2 python]) +AC_CHECK_PROGS([PYTHON], [python3]) # Initialize libtool AC_DISABLE_STATIC diff --git a/include/epoxy/meson.build b/include/epoxy/meson.build index 65f83be..c679efe 100644 --- a/include/epoxy/meson.build +++ b/include/epoxy/meson.build @@ -25,7 +25,6 @@ foreach g: generated_headers input: registry, output: [ gen_header ], command: [ - python, gen_dispatch_py, '--header', '--no-source', diff --git a/meson.build b/meson.build index 91d9792..b7bf8aa 100644 --- a/meson.build +++ b/meson.build @@ -196,12 +196,6 @@ if host_system == 'windows' gdi32_dep = cc.find_library('gdi32', required: true) endif -# Python -python = import('python3').find_python() -if not python.found() - python = find_program('python', required: true) -endif - # Generates the dispatch tables gen_dispatch_py = files('src/gen_dispatch.py') diff --git a/src/gen_dispatch.py b/src/gen_dispatch.py index f4d0f31..d33f128 100755 --- a/src/gen_dispatch.py +++ b/src/gen_dispatch.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright © 2013 Intel Corporation diff --git a/src/meson.build b/src/meson.build index fe092d1..371fd4b 100644 --- a/src/meson.build +++ b/src/meson.build @@ -33,7 +33,6 @@ foreach g: generated_sources input: registry, output: [ gen_source ], command: [ - python, gen_dispatch_py, '--source', '--no-header',