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
mkpack: add image resources #130
Conversation
these are crushed with a function imported from the SDK
Utilities/mkpack.py
Outdated
def expand_path(path): | ||
if path.startswith('~'): | ||
path = os.path.expanduser(path) | ||
return path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just return os.path.expanduser(path)
? the function returns args unchanged if there's no leading tilde :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately not with python 2.7 (which the pebble sdk is using), where it raises an exception if the path does not start with '~'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh. Works in 2.7.15 for me. ¯_(ツ)_/¯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed I cannot longer reproduce this behaviour, I must have misread the error message
Looks good. I wonder if there is a more Pythonic way to have |
Holy shit that went bad after a lot of "you can't comment at this time". Thanks, GitHub. |
Ok, since this is blocking #131 , let's just merge it, unless you can think of a cleaner way to deal with that. LGTM to merge! Also consider this 'pre-approval' for a PR to update the submodule ref for resources; I guess this has to go in first, then resources update, then a submodule ref here for the resources update, then #131. |
Aha, here this PR is. I saw this in my email and then lost it. I agree with the approach of having |
Why not resources first, then immediatetly this with the updated submodule ref and then #131? (btw: it seems like my right to merge has expired) |
That's fine too. Anyway, I've merged this, and will merge the resources change in a minute... |
these are crushed with a function imported from the SDK.
Requirement for this is the json declaring whether the target display has colors or not, as such this should be discussed and then applied to the resource repo (see pebble-dev/RebbleOS-resources#5)