mirror of https://github.com/kivy/kivy.git
windows: fix for windows / python3.3
This commit is contained in:
parent
a4e087f307
commit
6c48df4bba
|
@ -32,9 +32,9 @@ if 'KIVY_DOC' in os.environ:
|
|||
else:
|
||||
from collections import deque
|
||||
from ctypes.wintypes import (ULONG, UINT, WPARAM, LPARAM,
|
||||
HANDLE, BOOL, POINTER)
|
||||
HANDLE, BOOL)
|
||||
from ctypes import (Structure, windll, byref, c_int16,
|
||||
c_int, WINFUNCTYPE)
|
||||
c_int, WINFUNCTYPE, POINTER)
|
||||
from kivy.input.provider import MotionEventProvider
|
||||
from kivy.input.factory import MotionEventFactory
|
||||
|
||||
|
|
|
@ -43,8 +43,9 @@ if 'KIVY_DOC' in os.environ:
|
|||
|
||||
else:
|
||||
from ctypes.wintypes import (ULONG, HANDLE, DWORD, LONG, UINT,
|
||||
WPARAM, LPARAM, POINTER, BOOL)
|
||||
from ctypes import windll, WINFUNCTYPE, c_int, Structure, sizeof, byref
|
||||
WPARAM, LPARAM, BOOL)
|
||||
from ctypes import (windll, WINFUNCTYPE, POINTER,
|
||||
c_int, Structure, sizeof, byref)
|
||||
from collections import deque
|
||||
from kivy.input.provider import MotionEventProvider
|
||||
from kivy.input.factory import MotionEventFactory
|
||||
|
|
|
@ -254,7 +254,7 @@ cdef class GstPlayer:
|
|||
|
||||
# configure playbin
|
||||
g_object_set_int(self.pipeline, 'async-handling', 1)
|
||||
c_uri = <bytes>self.uri.decode('utf-8')
|
||||
c_uri = <bytes>self.uri.encode('utf-8')
|
||||
g_object_set_void(self.playbin, 'uri', c_uri)
|
||||
|
||||
# attach the callback
|
||||
|
|
28
setup.py
28
setup.py
|
@ -11,6 +11,7 @@ from os.path import join, dirname, sep, exists, basename
|
|||
from os import walk, environ
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
from collections import OrderedDict
|
||||
|
||||
if sys.version > '3':
|
||||
PY3 = True
|
||||
|
@ -28,10 +29,11 @@ def pkgconfig(*packages, **kw):
|
|||
flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'}
|
||||
cmd = 'pkg-config --libs --cflags {}'.format(' '.join(packages))
|
||||
for token in getoutput(cmd).split():
|
||||
flag = flag_map.get(token[:2])
|
||||
ext = token[:2].decode('utf-8')
|
||||
flag = flag_map.get(ext)
|
||||
if not flag:
|
||||
continue
|
||||
kw.setdefault(flag_map.get(token[:2]), []).append(token[2:])
|
||||
kw.setdefault(flag, []).append(token[2:])
|
||||
return kw
|
||||
|
||||
|
||||
|
@ -60,17 +62,17 @@ if exists('/opt/vc/include/bcm_host.h'):
|
|||
# -----------------------------------------------------------------------------
|
||||
# Detect options
|
||||
#
|
||||
c_options = {
|
||||
'use_rpi': platform == 'rpi',
|
||||
'use_opengl_es2': True,
|
||||
'use_opengl_debug': False,
|
||||
'use_glew': False,
|
||||
'use_sdl': False,
|
||||
'use_ios': False,
|
||||
'use_mesagl': False,
|
||||
'use_x11': False,
|
||||
'use_gstreamer': False,
|
||||
'use_avfoundation': platform == 'darwin'}
|
||||
c_options = OrderedDict()
|
||||
c_options['use_rpi'] = platform == 'rpi'
|
||||
c_options['use_opengl_es2'] = True
|
||||
c_options['use_opengl_debug'] = False
|
||||
c_options['use_glew'] = False
|
||||
c_options['use_sdl'] = False
|
||||
c_options['use_ios'] = False
|
||||
c_options['use_mesagl'] = False
|
||||
c_options['use_x11'] = False
|
||||
c_options['use_gstreamer'] = False
|
||||
c_options['use_avfoundation'] = platform == 'darwin'
|
||||
|
||||
# now check if environ is changing the default values
|
||||
for key in list(c_options.keys()):
|
||||
|
|
Loading…
Reference in New Issue