Skip to content

Commit

Permalink
Merge pull request #6658 from Dirk-Sandberg/iOS-garden-path-fix
Browse files Browse the repository at this point in the history
Fixes incorrect path to kivy garden libs on iOS
  • Loading branch information
matham committed Dec 22, 2019
2 parents 7de0314 + c3956b0 commit 662985b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kivy/garden/__init__.py
Expand Up @@ -140,6 +140,7 @@
import imp
from os.path import dirname, join, realpath, exists, abspath
from kivy import kivy_home_dir
from kivy.utils import platform
import kivy

#: system path where garden modules can be installed
Expand All @@ -151,6 +152,12 @@
garden_app_dir = join(realpath(sys._MEIPASS), 'libs', 'garden')
else:
garden_app_dir = join(realpath(dirname(sys.argv[0])), 'libs', 'garden')
#: Fixes issue #4030 in kivy where garden path is incorrect on iOS
if platform == "ios":
from os.path import join, dirname
import __main__
main_py_file = __main__.__file__
garden_app_dir = join(dirname(main_py_file), 'libs', 'garden')


class GardenImporter(object):
Expand Down

0 comments on commit 662985b

Please sign in to comment.