Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Osx Target to properly use buildozer.buildops #1768

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions buildozer/targets/osx.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def ensure_sdk(self):
self.logger.info('kivy-sdk-packager does not exist, clone it')
platdir = self.buildozer.platform_dir
buildops.download(
'https://github.com/kivy/kivy-sdk-packager/archive/master.zip',
'https://github.com/kivy/kivy-sdk-packager/archive/',
'master.zip',
cwd=platdir)
buildops.file_extract(
Expand All @@ -48,7 +48,7 @@ def download_kivy(self, cwd):
self.logger.info('Downloading kivy...')
try:
buildops.download(
f'https://kivy.org/downloads/{current_kivy_vers}/Kivy.dmg',
f'https://kivy.org/downloads/{current_kivy_vers}/',
'Kivy.dmg',
cwd=cwd
)
Expand All @@ -63,8 +63,8 @@ def download_kivy(self, cwd):

self.logger.info('Extracting and installing Kivy...')
check_call(('hdiutil', 'attach', cwd + '/Kivy.dmg'))
buildops.file_copy(
'/Volumes/Kivy/Kivy.app', './Kivy.app', cwd=cwd)
buildops.file_copytree(
'/Volumes/Kivy/Kivy.app', cwd+'/Kivy.app')

def ensure_kivyapp(self):
self.logger.info('check if Kivy.app exists in local dir')
Expand Down Expand Up @@ -128,11 +128,13 @@ def build_package(self):
cwd=cwd)
self.logger.info('{}.dmg created'.format(package_name))
self.logger.info('moving {}.dmg to bin.'.format(package_name))

package_name = package_name + '.dmg'
binpath = join(
self.buildozer.user_build_dir or
dirname(abspath(self.buildozer.specfilename)), 'bin')
buildops.file_copytree(
join(cwd, package_name + '.dmg'),
dirname(abspath(self.buildozer.specfilename)), 'bin') + '/' + package_name
buildops.file_copy(
join(cwd, package_name),
binpath)
self.logger.info('All Done!')

Expand Down
Loading