giampaolo / psutil

Cross-platform lib for process and system monitoring in Python
BSD 3-Clause "New" or "Revised" License
10.3k stars 1.39k forks source link

feat: add aarch64 manylinux wheels #2425

Closed mayeut closed 5 months ago

mayeut commented 5 months ago

Summary

Description

This PR continues work from #2103 (I've never removed that branch and rebased on master once in a while so that's the same branch in this PR).

cherry-picked commits from #2126 for missing test dependency in manylinux.

main differences between this PR and #2224:

Regarding tests that are failing on real arm64 hardware but hidden by QEMU testing:

====================================================================== FAIL: psutil.tests.test_linux.TestSystemCPUCountCores.test_method_2

Traceback (most recent call last): File "/project/psutil/tests/test_linux.py", line 820, in test_method_2 self.assertEqual(meth_1, meth_2) AssertionError: 10 != None

====================================================================== FAIL: psutil.tests.test_linux.TestSystemCPUFrequency.test_emulate_use_second_file

Traceback (most recent call last): File "/project/psutil/tests/test_linux.py", line 845, in test_emulate_use_second_file assert psutil.cpu_freq() AssertionError

====================================================================== FAIL: psutil.tests.test_linux.TestSystemNetIfAddrs.test_ips

Traceback (most recent call last): File "/project/psutil/tests/test_linux.py", line 1020, in test_ips self.assertEqual(addr.address, get_mac_address(name)) AssertionError: '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00' != '00:00:00:00:00:00'

giampaolo commented 5 months ago

Thank you Matthieu.

I added other platforms as well (ppc64le & s390x) [...] and musllinux

Please, let's just add aarch64 wheels for now (the ones with the highest demand). There's too many skipIf(...) which seems are due to emulation. Just so you know: my main concern here is keeping things as simple and maintainable as possible. Above all, we shouldn't introduce new random test failures (we already have a lot), and producing wheels / releases should be a smooth process.

mayeut commented 5 months ago

Please, let's just add aarch64 wheels for now (the ones with the highest demand)

I removed ppc64le & s390x (there's one demand from IBM #2210 for ppc64le).

I kept musllinux which are I think the second highest demand with 1 related issue & 3 opened PR. If you don't want to keep musllinux, just drop the commit 445b35d. Please note that 6f55304 is related to the addition of musllinux which comes with an up-to-date version of free/vmstat. Even if not building musllinux, this one will eventually come back as an issue once glibc distros get updated.

There's too many skipIf(...) which seems are due to emulation. Just so you know: my main concern here is keeping things as simple and maintainable as possible.

There are now less with s390x being dropped. I however understand your concern. Given GHA will most likely provide a native aarch64 before the end of the year, the QEMU test commit might be dropped completely 6aa80d3.

Above all, we shouldn't introduce new random test failures (we already have a lot), and producing wheels / releases should be a smooth process.

Agreed, that's why I disabled test_memleaks on those architectures. It was the only flaky one as far as I saw (and memleaks should mostly be independent of the processor architecture and tested otherwise).

Please feel free to force-push, drop commits, ... as you see fit. I have backups / alternatives to this work in my fork.

giampaolo commented 5 months ago

If you don't want to keep musllinux, just drop the commit 445b35d.

It seems I cannot modify your PR (I can push but can't see the changes reflected in here). Can you please remove musl wheels and update the README? The rest looks good. Also one minor thing. Is there a reason why it's called QEMU_USER instead of QEMU?

mayeut commented 5 months ago

It seems I cannot modify your PR (I can push but can't see the changes reflected in here).

weird... anyway

Also one minor thing. Is there a reason why it's called QEMU_USER instead of QEMU?

QEMU provides full-system emulation or user-mode emulation. Here, we only use user-mode emulation.

mayeut commented 5 months ago

update the README?

I guess you meant HISTORY ?

giampaolo commented 5 months ago

Yes, sorry. 😄