mirror of https://github.com/kivy/kivy.git
Update binary_deps to be in package_data.
This commit is contained in:
parent
7c80c52423
commit
8ededcb6a4
|
@ -33,8 +33,8 @@ __version__ = '1.9.1-dev'
|
|||
import sys
|
||||
import shutil
|
||||
from getopt import getopt, GetoptError
|
||||
from os import environ, mkdir
|
||||
from os.path import dirname, join, basename, exists, expanduser
|
||||
from os import environ, mkdir, pathsep
|
||||
from os.path import dirname, join, basename, exists, expanduser, isdir
|
||||
from kivy.logger import Logger, LOG_LEVELS
|
||||
from kivy.utils import platform
|
||||
|
||||
|
@ -223,6 +223,9 @@ kivy_exts_dir = environ.get('KIVY_EXTS_DIR',
|
|||
#: Kivy data directory
|
||||
kivy_data_dir = environ.get('KIVY_DATA_DIR',
|
||||
join(kivy_base_dir, 'data'))
|
||||
#: Kivy binary deps directory
|
||||
kivy_binary_deps_dir = environ.get('KIVY_BINARY_DEPS',
|
||||
join(kivy_base_dir, 'binary_deps'))
|
||||
#: Kivy glsl shader directory
|
||||
kivy_shader_dir = join(kivy_data_dir, 'glsl')
|
||||
#: Kivy icons config path (don't remove the last '')
|
||||
|
@ -378,6 +381,10 @@ if not environ.get('KIVY_DOC_INCLUDE'):
|
|||
Logger.info('Core: Kivy configuration saved.')
|
||||
sys.exit(0)
|
||||
|
||||
# add kivy_binary_deps_dir if it exists
|
||||
if exists(kivy_binary_deps_dir):
|
||||
environ["PATH"] = kivy_binary_deps_dir + pathsep + environ["PATH"]
|
||||
|
||||
# configure all activated modules
|
||||
from kivy.modules import Modules
|
||||
Modules.configure()
|
||||
|
|
16
setup.py
16
setup.py
|
@ -210,7 +210,6 @@ if not have_cython:
|
|||
|
||||
# the build path where kivy is being compiled
|
||||
src_path = build_path = dirname(__file__)
|
||||
kivy_binary_deps = environ.get('KIVY_BINARY_DEPS')
|
||||
|
||||
|
||||
class KivyBuildExt(build_ext):
|
||||
|
@ -273,11 +272,6 @@ class KivyBuildExt(build_ext):
|
|||
for e in self.extensions:
|
||||
e.extra_link_args += ['-lm']
|
||||
|
||||
if kivy_binary_deps is not None and isdir(kivy_binary_deps):
|
||||
print('Copying kivy binary deps from {} to {}'.
|
||||
format(kivy_binary_deps, expand(build_path)))
|
||||
copy_files(kivy_binary_deps, expand(build_path))
|
||||
|
||||
build_ext.build_extensions(self)
|
||||
|
||||
def update_if_changed(self, fn, content):
|
||||
|
@ -818,6 +812,14 @@ for root, subFolders, files in walk('examples'):
|
|||
examples[directory] = []
|
||||
examples[directory].append(filename)
|
||||
|
||||
binary_deps = []
|
||||
binary_deps_path = join(src_path, 'kivy', 'binary_deps')
|
||||
if isdir(binary_deps_path):
|
||||
for root, dirnames, filenames in walk(binary_deps_path):
|
||||
for fname in filenames:
|
||||
binary_deps.append(
|
||||
join(root.replace(binary_deps_path, 'binary_deps'), fname))
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# setup !
|
||||
setup(
|
||||
|
@ -902,7 +904,7 @@ setup(
|
|||
'tools/packaging/win32/README.txt',
|
||||
'tools/packaging/osx/Info.plist',
|
||||
'tools/packaging/osx/InfoPlist.strings',
|
||||
'tools/packaging/osx/kivy.sh']},
|
||||
'tools/packaging/osx/kivy.sh'] + binary_deps},
|
||||
data_files=list(examples.items()),
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
|
|
Loading…
Reference in New Issue