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

Conditional build script fixes #1604

Merged

Conversation

AndreMiras
Copy link
Member

  • explicitly sets default target python3 to build order
  • uses logger rather than print
  • updates libzbar recipe to demo python2 fallback (E126 lint fix)

if target_python.name not in build_order:
print('incompatible with {}'.format(target_python.name))
# forces the default target
recipes_and_target = recipes | set([target_python.name])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -17,7 +17,7 @@ class LibZBarRecipe(Recipe):

def should_build(self, arch):
return not os.path.exists(
os.path.join(self.ctx.get_libs_dir(arch.arch), 'libzbar.so'))
os.path.join(self.ctx.get_libs_dir(arch.arch), 'libzbar.so'))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor E126 lint fix to demonstrate conditional recipe rebuild.
The libzbar recipe is currently python2 only so the conditional build script should first try with current default target python3 and then fallback to python2

- explicitly sets default target python3 to build order
- uses logger rather than print
- updates libzbar recipe to demo python2 fallback (E126 lint fix)
@AndreMiras AndreMiras force-pushed the feature/conditional_build_improvements branch from 55a5cf0 to 92fde71 Compare January 20, 2019 22:05
@AndreMiras
Copy link
Member Author

Conditional build successfully, see log https://travis-ci.org/kivy/python-for-android/jobs/482167490
Relevant part of the log:

[INFO]:    incompatible with python3
[INFO]:    falling back to python2
[INFO]:    recipes to build (no broken): set([u'libzbar'])
[INFO]:    requirements: python2,libzbar

Ready for the merge

@AndreMiras AndreMiras merged commit 4b4d55a into kivy:master Jan 21, 2019
@AndreMiras AndreMiras deleted the feature/conditional_build_improvements branch January 21, 2019 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants