-
-
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
Build wheel #1758
Build wheel #1758
Conversation
Nice, this looks promising. On what Linux distro is this built?
What Linux distro are these wheels built on? |
Currently it is build on Centos 7 but I will switch it to Centos6 in next commit. On Centos 6 I register few more erors. Wheels will be avaliable in actions. You can see here https://github.com/Czaki/psutil/actions |
pypy wheels will be build on centos7 because they not offer centos6 docker based images. |
I suppose that's because of |
As far as I know I try to response on your answer to manylinux. There are three manylinux tags
and pip know host system glibc version and then check if there is available wheel with enough low version glibc. So if hos system has to low version of glibc then it will build from source. Main weekness of manylinux2010 platform tag is that it need pip in version 19.0. The idea of building manylinux wheel is to build them inside docker container. manylinux team create docker images I'm contributor to |
Sweet. In that case I think we should stick with CentOS 7. For the record, I've been using a similar policy for Windows XP (supported from sources only, but now it's gone for good). Question, in case you know: what happens if the wheel does not support a recent distro? Is pip able to know that in advance or retry by using the tarball? My doubt is if by distributing wheels there's a chance we break some installations that now work fine because the tarball is the only thing currently available on PYPI. |
What did you men by not support? wheels are checked with I do not meet case when wheel works only with old system and does not work with modern one. Win wheel name there is platform tag. |
@giampaolo I I should manually mark some test as not use in build, or wait on signal from you that I should use more modern version? And maybe it is beter to check |
Is it using CentOS 6 or 7?
I guess we're on 6? |
This build is on centos 7 https://github.com/Czaki/psutil/actions/runs/103672866 This is two line switch. Go back to centos 7? |
Rely on "__NR_prlimit64" availability and check GLIBC version only. Take kernel version out of the picture. This way it works on both CentOS 6 and 7. Also, have test_contracts.py tests assume prlimit() is always available, so that we will be notified (by failure). Ref: #1758
What to do with error |
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.
This is two line switch. Go back to centos 7?
Yes. I pushed a couple of commits which should fix some failures so you should rebase.
setup.py
Outdated
"ipaddress; python_version < '3.0'", | ||
"mock; python_version < '3.0'", | ||
"pypiwin32; sys.platform == 'win32'", | ||
"wmi; sys.platform == 'win32'"]} | ||
if sys.version_info[:2] <= (3, 3): | ||
extras_require.update(dict(enum='enum34')) |
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.
Please add this to the above list.
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.
fixed
psutil/tests/__init__.py
Outdated
@@ -123,7 +123,8 @@ | |||
TRAVIS = bool(os.environ.get('TRAVIS')) | |||
APPVEYOR = bool(os.environ.get('APPVEYOR')) | |||
CIRRUS = bool(os.environ.get('CIRRUS')) | |||
CI_TESTING = TRAVIS or APPVEYOR or CIRRUS | |||
GITHUB = bool(os.environ.get('CI', False)) |
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.
'CI' is a bit generic and perhaps it can collide with something else;
Maybe we can set an env var from .github/workflows/build_wheel.yml
. Something like GITHUB_WHEELS
.
https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#about-environment-variables
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.
ok
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.
Still few errors (2 on mac 4 on linux) and unknown reason of windows fail
According to this failure:
... Lines 45 to 48 in 2c113c6
...which should be "true" on CentOS 7. Are you sure we're compiling against CentOS 7? The resulting wheels have |
argh... I do wrong counting I add step with manylinux2014 build and it still fail. |
OK, good. There are still some failures but the important one was to make |
Done. It meanas that there will be no wheel for pypy for linux (they provide only manylinux 2010 docker image) |
Mmmm. OK, I just downloaded the zip and indeed I see some wheels produced for PYPY with 2010/CentOS-6:
I have mixed feelings about PYPY. I consider it low priority, but since this basically comes for free maybe we can decide to either 1) accept that Also I have a couple of questions about OSX:
As for this failure:
I think you can try this change: diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py
index 9667b5d5..33d5d2fd 100644
--- a/psutil/tests/__init__.py
+++ b/psutil/tests/__init__.py
@@ -199,7 +199,9 @@ def _get_py_exe():
else:
return exe
- if MACOS:
+ if GITHUB_WHEELS:
+ return 'python'
+ elif MACOS:
exe = \
attempt(sys.executable) or \
attempt(os.path.realpath(sys.executable)) or \
~/svn/psutil {master}$ If it doesn't work don't worry and I'll investigate it once we merge this. The few failures we have are issues with tests themselves and not psutil, so they are not important. |
apply patch from giampaolo#1758 (comment)
I just download and see this files:
which version is missed?
macos 10.9 means that minimal version of system is macosx 10.9. Wheel should run on all newer version (from 10.15 only x86_64, but this wheel is already 64-bits) |
Maybe this: + if GITHUB_WHEELS:
+ return os.path.realpath('python') |
find path to python executable
One problem which I see that if any test fail then wheel building fail. Because of this I add second group which build wheels without test. So I prefer to mark this test with x-fail to run see if there are no problem with other versions. |
Yeah, I agree it is best to ignore test failures. I am already busy enough taking a look at "normal" (non-wheel) builds. =) |
Python 2.7 wheels for Linux are missing due to this directive:
When I remove it I get this error:
The issue disappears if I use CentOS 6 / manylinux2010. I've been struggling with this the whole day. :( |
Yes. manylinux2014 does not provide python 2.7 executable. You supprise me with this merge I have add few commit to branch but I plan to create next PR when I got working version. |
Oh sorry, I thought you were done. And it was probably too soon anyway (the Windows error is very obscure). I have a PR I am going to merge soon which fixes some of the tests which were/are failing here.
Then we're stuck with 2010. That'll probably mean ctypes for |
Merged #1761. |
I would like to add build wheel for psutil to allow easy install on non gcc macos and linux system.
All wheels are build without problem, but when I add tests it fails. I found that part of test need to be disabled (because they are disabled on travis).
I choose github workflows, because they allow to create artefacts (on travis there is need to upload to remote server) and not need to create additional account like on AzurePipelines.
cibuildwheel
is really nice tool and reduce maintainty of building wheel process. most often to upgrade version of cibuildwheel.I see discussion in #824 and think that I can help with fast wheel creation, but I do not know psutil enough weel to understnad if some test should be blacklisted if run on Macos 10.15 or inside Docker container.