-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Android compatibility #843
Conversation
@@ -77,6 +77,8 @@ def write(self, s): | |||
if platform.release() == '5.10': | |||
posix_extension.sources.append('psutil/arch/solaris/v10/ifaddrs.c') | |||
posix_extension.define_macros.append(('PSUTIL_SUNOS10', 1)) | |||
if 'ANDROID_ROOT' in os.environ: |
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.
I wish there was a cleaner way but sys.platform
returns linux
on Android.
This is very interesting. Some comments:
instead of
|
|
So, getting back to this. I bumped into: |
Ionic Box is not and Android image. It is a Linux image that helps you build Android apps easily. |
OK, as I thought I clearly lack some important pieces of this whole android picture. Can you perhaps tell me what I should do in order to set up an Android image so that I can experiment with this? |
It seems that my patch is not needed at all anymore, which is great news, so I'm closing this issue. AFAIK the easiest way to run Android on Linux is to use the official emulator. |
Hello,
Here is a patch that allows psutil to build on Android (with Termux).
However it does not passes all the tests.
ifaddrs.h does not exist on Android, so I included it from here: https://github.com/morristech/android-ifaddrs