mirror of https://github.com/kivy/kivy.git
commit
1d3b9031ef
|
@ -135,6 +135,17 @@ def kivy_configure():
|
|||
callback()
|
||||
|
||||
|
||||
def get_includes():
|
||||
'''Retrieves the directories containing includes needed to build new Cython
|
||||
modules with Kivy as a dependency. Currently returns the location of the
|
||||
kivy.graphics module.
|
||||
|
||||
.. versionadded:: 1.9.2
|
||||
'''
|
||||
root_dir = dirname(__file__)
|
||||
return [join(root_dir, 'graphics'), join(root_dir, 'tools', 'gles_compat')]
|
||||
|
||||
|
||||
def kivy_register_post_configuration(callback):
|
||||
'''Register a function to be called when kivy_configure() is called.
|
||||
|
||||
|
@ -402,4 +413,3 @@ if not environ.get('KIVY_DOC_INCLUDE'):
|
|||
|
||||
Logger.info('Kivy: v%s' % (__version__))
|
||||
Logger.info('Python: v{}'.format(sys.version))
|
||||
|
||||
|
|
24
setup.py
24
setup.py
|
@ -333,7 +333,8 @@ else:
|
|||
if not c_options['use_opengl_es2']:
|
||||
print('NOTE: Not found GLES 2.0 headers at: {}'.format(
|
||||
default_header_dirs))
|
||||
print(' Please contact us if your distribution '
|
||||
print(
|
||||
' Please contact us if your distribution '
|
||||
'uses an alternative path for the headers.')
|
||||
|
||||
print('Using this graphics system: {}'.format(
|
||||
|
@ -483,7 +484,8 @@ def determine_base_flags():
|
|||
sdk_mac_ver = '.'.join(_platform.mac_ver()[0].split('.')[:2])
|
||||
print('Xcode detected at {}, and using MacOSX{} sdk'.format(
|
||||
xcode_dev, sdk_mac_ver))
|
||||
sysroot = join(xcode_dev.decode('utf-8'),
|
||||
sysroot = join(
|
||||
xcode_dev.decode('utf-8'),
|
||||
'Platforms/MacOSX.platform/Developer/SDKs',
|
||||
'MacOSX{}.sdk'.format(sdk_mac_ver),
|
||||
'System/Library/Frameworks')
|
||||
|
@ -516,7 +518,8 @@ def determine_gl_flags():
|
|||
flags['extra_link_args'] = ['-L', join(ndkplatform, 'usr', 'lib')]
|
||||
flags['libraries'] = ['GLESv2']
|
||||
elif platform == 'rpi':
|
||||
flags['include_dirs'] = ['/opt/vc/include',
|
||||
flags['include_dirs'] = [
|
||||
'/opt/vc/include',
|
||||
'/opt/vc/include/interface/vcos/pthreads',
|
||||
'/opt/vc/include/interface/vmcs_host/linux']
|
||||
flags['library_dirs'] = ['/opt/vc/lib']
|
||||
|
@ -618,7 +621,8 @@ graphics_dependencies = {
|
|||
'instructions.pyx': [
|
||||
'config.pxi', 'opcodes.pxi', 'c_opengl.pxd', 'c_opengl_debug.pxd',
|
||||
'context.pxd', 'common.pxi', 'vertex.pxd', 'transformation.pxd'],
|
||||
'opengl.pyx': ['config.pxi', 'common.pxi', 'c_opengl.pxd', 'gl_redirect.h'],
|
||||
'opengl.pyx': [
|
||||
'config.pxi', 'common.pxi', 'c_opengl.pxd', 'gl_redirect.h'],
|
||||
'opengl_utils.pyx': ['opengl_utils_def.pxi', 'c_opengl.pxd'],
|
||||
'shader.pxd': ['c_opengl.pxd', 'transformation.pxd', 'vertex.pxd'],
|
||||
'shader.pyx': [
|
||||
|
@ -643,8 +647,8 @@ graphics_dependencies = {
|
|||
'vertex.pxd': ['c_opengl.pxd'],
|
||||
'vertex.pyx': ['config.pxi', 'common.pxi'],
|
||||
'vertex_instructions.pyx': [
|
||||
'config.pxi', 'common.pxi', 'vbo.pxd', 'vertex.pxd', 'instructions.pxd',
|
||||
'vertex_instructions.pxd',
|
||||
'config.pxi', 'common.pxi', 'vbo.pxd', 'vertex.pxd',
|
||||
'instructions.pxd', 'vertex_instructions.pxd',
|
||||
'c_opengl.pxd', 'c_opengl_debug.pxd', 'texture.pxd',
|
||||
'vertex_instructions_line.pxi'],
|
||||
'vertex_instructions_line.pxi': ['stencil_instructions.pxd']}
|
||||
|
@ -800,8 +804,8 @@ def get_extensions_from_sources(sources):
|
|||
for key, value in flags.items():
|
||||
if len(value):
|
||||
flags_clean[key] = value
|
||||
ext_modules.append(CythonExtension(module_name,
|
||||
[pyx] + f_depends + c_depends, **flags_clean))
|
||||
ext_modules.append(CythonExtension(
|
||||
module_name, [pyx] + f_depends + c_depends, **flags_clean))
|
||||
return ext_modules
|
||||
|
||||
ext_modules = get_extensions_from_sources(sources)
|
||||
|
@ -819,7 +823,7 @@ for root, subFolders, files in walk('examples'):
|
|||
continue
|
||||
filename = join(root, fn)
|
||||
directory = '%s%s' % (data_file_prefix, dirname(filename))
|
||||
if not directory in examples:
|
||||
if directory not in examples:
|
||||
examples[directory] = []
|
||||
examples[directory].append(filename)
|
||||
|
||||
|
@ -888,6 +892,7 @@ setup(
|
|||
'core/text/*.pxi',
|
||||
'graphics/*.pxd',
|
||||
'graphics/*.pxi',
|
||||
'graphics/*.h',
|
||||
'lib/vidcore_lite/*.pxd',
|
||||
'lib/vidcore_lite/*.pxi',
|
||||
'data/*.kv',
|
||||
|
@ -915,6 +920,7 @@ setup(
|
|||
'tools/packaging/win32/README.txt',
|
||||
'tools/packaging/osx/Info.plist',
|
||||
'tools/packaging/osx/InfoPlist.strings',
|
||||
'tools/gles_compat/*.h',
|
||||
'tools/packaging/osx/kivy.sh'] + binary_deps},
|
||||
data_files=list(examples.items()),
|
||||
classifiers=[
|
||||
|
|
Loading…
Reference in New Issue