-
-
Notifications
You must be signed in to change notification settings - Fork 704
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
Installation of pyobjc-Core makes watchdog unusable on non MacOS hardware #618
Comments
Unfortunately, I cannot reproduce yet. import os
import sys
from distutils.util import get_platform
print(sys.platform)
print(os.getenv("_PYTHON_HOST_PLATFORM"))
print(get_platform())
print(os.name)
print(os.uname()) And what is your OS and OS version? |
Could you try to install the version from that branch: https://github.com/gorakhargosh/watchdog/tree/fix-use-sys-platform? |
The output of the commands is:
The contents of the
|
installing from the branch you mentioned seems to have worked:
|
Great news! Even if I do not understand how it happened :D |
|
I've got something similar to this but I am not on a Mac. I am working on a project right now that still uses Python 3.4 (yes I know, beyond my control) and ever since the release of watchdog 0.10.0 on January 27 our Travis CI jobs have started failing. That is because for some weird reason it's started thinking Travis CI is a Mac and it tries to install PyLibObjC which then blows up because this file is never goingo exist on Linux: FileNotFoundError: [Errno 2] No such file or directory: '/System/Library/CoreServices/SystemVersion.plist' I believe however it shouldn't be installing PyLibObjC at all on Linux, only on Mac. For now I am pinning watchdog to the previous version until this is resolved. It does not fail on Python 3.6 as we run CI on various Python versions, only 3.4 is actually doing this. |
@robvdl Looks like 0.10.1 will be released tomorrow. So you can probably unpin your dependencies after that. Addendum: An alternative would be to pn the # This is being installed specific for drawin and a patch around the incorrect
# requirements declared in `watchdog`. This is resolved in watchdog==0.10.1
# which is currently not released.
pyobjc-core = {version="*", sys_platform = "== 'darwin'"}
pyobjc-framework-cocoa = {version="*", sys_platform = "== 'darwin'"}
pyobjc-framework-fsevents = {version="*", sys_platform = "== 'darwin'"} |
Ah good, I was just re-reading over the previous comments and realised it was the same issue and a fix was already made thanks. I'll probably just wait it out, no point adding a pin for 1 day, it's weekend anyway. |
The release 0.10.1 is out :) |
Hate to be the bearer of bad news but unfortunately this issue still exists when installing watchdog==0.10.1 on Travis CI using Trusty/python 3.4 (though 3.6 doesn't do it).
I still am finding that installing watchdog==0.10.1 on Travis (trusty) and python 3.4 is thinking it's a Mac and trying to install PyObjC. I can understand you may want to drop support for Trusty, if that is the case I can pin the old version of watchdog temporarily until we can finalise moving our client to Bionic, it's in progress anyway just slower than I would hope. The weird thing is in a Trusty vagrant VM it won't do it, tried rebuilding the Vagrant VM and it's absolutely fine. So it seems to be isolated to Travis CI and Python 3.4? |
Another issue related to this is that because the system platform is determined at install-time, this makes pinning dependencies (e.g with pip freeze or pip-tools) across platforms difficult. For example if I'm on macOS and do:
requirements.txt would have Our solution was to add
(perhaps this is pyobjc's fault though, I feel like it should fail at run-time, not install-time) |
Also, would #623 fix this? |
Not at all. As PyObjC will always required. |
We are using Pipfile, and have opted to pin pyobjc dependencies with the
sys_platform constraint. This resolves the symptom, not the cause. I
suggest you do the same while a long term solution is rolled out.
…On Sat, Feb 1, 2020 at 5:23 AM Mickaël Schoentgen ***@***.***> wrote:
Also, would #623 <#623>
fix this?
Not at all. As PyObjC will always required.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#618?email_source=notifications&email_token=AAG6QNJ3REUZN2MUA65XNJ3RAVERPA5CNFSM4KMTIEKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKQZRUI#issuecomment-581015761>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG6QNIAX7HRUNOEKF7NUP3RAVERPANCNFSM4KMTIEKA>
.
|
This is already what we do (since the beginning), see: Lines 4 to 5 in 8f7e051
|
Yeah thinking through this more I don't see many solutions that I think pyobjc shouldn't fail installs on non-macOS platforms. I opened an issue there if anyone wants to follow/contribute: https://bitbucket.org/ronaldoussoren/pyobjc/issues/291/install-fails-on-non-macos-platforms |
Also @zo7 in my particular case I'm pretty sure it could be failing to parse this on python 3.4 because of the version of setuptools and pip in use:
Python 3.4 will only take upto a particular version of setuptools and pip and it's quite possible that those versions are not parsing this syntax yet? I am just thinking because this is working fine on Python 3.6, we have a CI job with a build matrix and only 3.4 is actually failing here but 3.6 is passing. There for I was suggesting an option could be to say you no longer support python 3.4 for the 0.10.x version, it's no longer in support anyway and many projects have done this already. People still using Python 3.4 are likely already transitioning of it anyway, we can just pin 0.9.0 right now and it's fine, I wouldn't worry if Python 3.4 support was actually dropped officially in watchdog. |
The text was updated successfully, but these errors were encountered: