Ensure glfw is imported from the correct place

This commit is contained in:
Kovid Goyal 2020-03-06 08:23:01 +05:30
parent 6609d219f4
commit 686b5f297e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -23,13 +23,14 @@ from typing import (
Union Union
) )
from glfw import glfw
if sys.version_info[:2] < (3, 6): if sys.version_info[:2] < (3, 6):
raise SystemExit('kitty requires python >= 3.6') raise SystemExit('kitty requires python >= 3.6')
base = os.path.dirname(os.path.abspath(__file__)) base = os.path.dirname(os.path.abspath(__file__))
verbose = False sys.path.insert(0, base)
from glfw import glfw # noqa
del sys.path[0] del sys.path[0]
verbose = False
build_dir = 'build' build_dir = 'build'
constants = os.path.join('kitty', 'constants.py') constants = os.path.join('kitty', 'constants.py')
with open(constants, 'rb') as f: with open(constants, 'rb') as f: