Commit 981c059f authored by Christoph Reiter's avatar Christoph Reiter 🐍

Drop Python 2 support on Windows

Fixes #363
parent 28962d86
......@@ -51,20 +51,6 @@ pages:
only:
- master
python2-mingw32:
variables:
PYTHON: "python2"
MSYSTEM: "MINGW32"
CHERE_INVOKING: "yes"
<<: *mingw-defaults
python2-mingw64:
variables:
PYTHON: "python2"
MSYSTEM: "MINGW64"
CHERE_INVOKING: "yes"
<<: *mingw-defaults
python3-mingw32:
variables:
PYTHON: "python3"
......
......@@ -15,6 +15,10 @@ platform_version = '@0@.0'.format(pygobject_version_major)
pymod = import('python')
python = pymod.find_installation(get_option('python'))
if python.language_version().version_compare('< 3.0') and host_machine.system() == 'windows'
error('Python 2 on Windows no longer supported since 3.35. Use Python 3 instead.')
endif
python_dep = python.dependency()
glib_version_req = '>= 2.48.0'
......
......@@ -1111,6 +1111,9 @@ class build_ext(du_build_ext):
add_ext_compiler_flags(gi_cairo_ext, compiler)
def run(self):
if os.name == "nt" and sys.version_info[0] == 2:
raise SystemExit("Python 2 on Windows no longer supported since 3.35. Use Python 3 instead.")
self._write_config_h()
self._setup_extensions()
du_build_ext.run(self)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment