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

Install fails on iOS #687

Closed
daspri opened this issue Sep 10, 2020 · 9 comments · Fixed by #698
Closed

Install fails on iOS #687

daspri opened this issue Sep 10, 2020 · 9 comments · Fixed by #698

Comments

@daspri
Copy link

daspri commented Sep 10, 2020

iOS does not have FSEvents afaik (it fails to compile), but watchdog forces compilation of watchdog_fsevents.c on all sys.platform == 'darwin' systems, causing it to fail to compile/install.

Commenting that out from setup.py allows watchdog to be installed and used on iOS.

@BoboTiG
Copy link
Collaborator

BoboTiG commented Oct 21, 2020

Well, it will be possible to filter out iOS when Python will detect it. As of now, I am not aware of a simple code to check if the current OS is iOS.

But I may be lacking of knowledge and open to suggestions, of course :)

@daspri
Copy link
Author

daspri commented Oct 21, 2020

platform.machine() returns the iPhone#,#/iPad#,#/Watch#,# mobile device type. ( https://gist.github.com/adamawolf/3048717 ) I believe it returns 'x86_64' on macOS (I only have a VM).

import platform
print(platform.machine() )
iPad7,5

I don't know if that is the "correct" method. Apple is moving macOS to ARM so distinguishing ARM from i386/x86_64 in os.uname()/platform.uname() might not be reliable in the future.

print (platform.uname())

# iPad:
uname_result(system='Darwin', node='xxx', release='19.5.0', version='Darwin Kernel Version 19.5.0: Tue Apr 28 22:25:26 PDT 2020; root:xnu-6153.122.1~1/RELEASE_ARM64_T8010', machine='iPad7,5', processor='arm64')

# macOS VM:
uname_result(system='Darwin', node='xxx', release='19.5.0', version='Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64', machine='x86_64', processor='i386')

@BoboTiG
Copy link
Collaborator

BoboTiG commented Oct 21, 2020

Thanks, this is exactly what I was looking for :)

If you patch

if sys.platform == 'darwin':
with:

if sys.platform == 'darwin' and platform.machine() in ('x86_64', 'arm64'):

Does it work for you? (Think to add the import too.)

@daspri
Copy link
Author

daspri commented Oct 21, 2020

Yes, that installs on iOS.

@BoboTiG
Copy link
Collaborator

BoboTiG commented Oct 21, 2020

Cool, do you mind opening a PR ? If so, think to add a line in the changelog & your username in the "beloved contributors" line :)

@daspri
Copy link
Author

daspri commented Oct 21, 2020

Maybe if I learn how to make a PR, but I don't have time at the moment. It should be easy for anyone to fix.

@BoboTiG
Copy link
Collaborator

BoboTiG commented Oct 21, 2020

OK I will do it tomorrow then.

@BoboTiG
Copy link
Collaborator

BoboTiG commented Oct 28, 2020

@daspri could you confirm that the fix from #698 is working for you please?

@daspri
Copy link
Author

daspri commented Oct 28, 2020

@BoboTiG Yes, it installs on iOS (ipad).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants