-
-
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
Provide wheel for Linux and OSX [was: Install psutil without gcc?] #824
Comments
No, it is not possible. Converting the code base to ctypes for all platforms is a huge work. The main drawback I see is that you get rid of years of tested and working code and replace it with something brand new and not tested as much. Basically all the motivations I gave in #591 (comment) apply here as well. Why installing gcc is a problem for you? |
Thank you for your feedback. Installing without gcc is a restriction from the one providing the environment. I don't like this restriction and I think it is useless, too. I can work around it:
If you see a different (or easier) way, please tell me. My question was answered. Thank you. Closing this. |
On Linux / Unix the only way you have to install psutil right now is via source / tarball. I don't want to provide wheels for Linux (or other UNIX platforms). I would have to cover all supported python versions (7) both 32 and 64 bits, meaning 14 extra packages to compile and upload on PYPI on every release. I do that for Windows because installing VS is an order of magnitude more difficult than installing gcc on Linux/UNIX but again: not willing to do extra work on that front (sorry). |
If the wheel folks want wheels to be successful, then they could provide a build server. Leaving building wheels to the developers is a waste of time and energy. And non-repeatable builds will be the result if every body builds his wheels in a different build environment... I asked on the distutils mailinglist what they think about it: https://mail.python.org/pipermail/distutils-sig/2016-May/028994.html |
With https://github.com/pypa/manylinux being quite extensively used, can this be reopened ? |
In practical terms what would it take to take advantage of manylinux? Is it something which can be integrated and automatized via travis or it would require me to set up a local environment consisting of docker + manylinux + whatever? As of now I upload the tar.gz from my linux laptop and the windows exes/wheels are hosted on appveyor (I download them locally then I upload them on PYPI). How would this kind of workflow gonna change with manylinux? |
Have a look at https://github.com/pypa/python-manylinux-demo Basically, you call that script that builds the wheels for multiple python versions and use auditwheel to package It can be achieved locally, or you can make travis call those scripts and upload the wheels. |
You can also look at psycopg2 : they have a separate git repo with the tools for building each new release : https://github.com/psycopg/psycopg2-wheels |
Not willing to do it myself locally on every release. Do you have an example for Travis? |
Oh, psycopg has it, nevermind. |
I'm also interested in having psutil python wheels on linux: any updates on using manylinux to create the wheels? |
The best way to do this would be to have Travis build the wheels on every
commit and save them somewhere as "artifacts" then download them locally
and finally upload them on pypi with twine. We currently use this strategy
for windows via appveyor.com.
The same can also be done for Linux and possibly OS X.
The goal is to figure out how to do this via .travis.yml.
I currently don't have time to look into this so if somebody wants to give
it a try.... I am all for it.
On Wed, 6 Sep 2017 at 18:52, Bruno Binet ***@***.***> wrote:
I'm also interested in having psutil python wheels on linux: any updates
on using manylinux to create the wheels?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#824 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAplLC1ZrRcyBjqDBkuYxtIPkFZBrS_Hks5sfnl9gaJpZM4IlKUi>
.
--
Giampaolo - http://grodola.blogspot.com
|
Re-opening. Goal: provide wheels for Linux and possibly OSX via travis CI. |
@giampaolo I whish you good luck with "provide wheels for Linux and possibly OSX". Do you already have a roadmap to reach the goal? |
It's something which needs to be investigated. A quick Google search brought me here: |
AFAICT whereas AppVeyor gives you space to store the wheels on their machines Travis won't, so that is the main stopper. |
I am subscribed to the distutils mailing list. I asked the experts if what they think: https://mail.python.org/pipermail/distutils-sig/2017-September/031506.html |
Sure, it's doable. You will need to take advantage of Travis's new "Build stages" feature. Do your testing in one build stage and wheel building/deployment in the next. You should be able to build a suitable job matrix with relatively little work. Make sure you use the manylinux1 Docker images to minimize the necessary effort. |
IIUC, storing packages in a github repo is fine for low-volume things; but artifacts uploaded as /releases are differently CDN'd? |
Guys - I'm happy to give you access to the Rackspace CDN for you to upload to. Further upload to pypi can be fairly well automated as well : https://github.com/MacPython/cython-wheels#quickstart |
@giampaolo Why is there need for wheel storage space with Travis? Why not just build them and upload to PyPI directly? |
If that turns out to be possible then I am all for it. That should happen
"on request" when we tag a new version though. I am not interested in
having intermediate builds for each commit.
On Sat, 9 Sep 2017 at 19:18, Alex Grönholm ***@***.***> wrote:
@giampaolo <https://github.com/giampaolo> Why is there need for wheel
storage space with Travis? Why not just build them and upload to PyPI
directly?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#824 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAplLPE4d352Bv-j247bm71nlPvPgzBsks5sgnQagaJpZM4IlKUi>
.
--
Giampaolo - http://grodola.blogspot.com
|
If you're fine with the wheel building happening on every build but the PyPI upload only on tags, then yes, that is totally doable. |
The way that we do it over at numpy / scipy / matplotib etc, is have a separate repo for doing the wheel builds, which we trigger at release time. This uploads to Rackspace, allowing us to check that the builds are all good, and have passed, before uploading from Rackspace to PyPI. In practice, that has been a useful extra step to avoid messing up on the PyPI release. Several projects (such as numpy, scipy, matplotlib) also do daily wheel builds on the master branch, from the same repository, to make sure the wheel build is still working. |
What if the build on tag fails because one of test suites fail due to a
false positive? Perhaps the wheel build should happen regardless of the
test results.
On Sat, 9 Sep 2017 at 19:33, Alex Grönholm ***@***.***> wrote:
If you're fine with the wheel building happening on every build but the
PyPI upload only on tags, then yes, that is totally doable.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#824 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAplLDYH8sNdvNCE9nyeBvFpzFCPLb18ks5sgnengaJpZM4IlKUi>
.
--
Giampaolo - http://grodola.blogspot.com
|
I don't understand what you mean by "fail due to a false positive". |
@giampaolo Shouldn't manywheels project solve this, aka building via that should make this work on Linux/Mac too? |
manylinux wheels should work on many Linux distros, but IDK about Mac?
https://github.com/pypa/manylinux/blob/master/README.rst#example links to
an example of building manylinux wheels with Travis CI
- https://github.com/pypa/python-manylinux-demo/blob/master/.travis.yml
-
https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh
https://github.com/joerick/cibuildwheel :
* Builds manylinux, macOS and Windows (32 and 64bit) wheels using Travis
CI, Appveyor, and CircleCI
* Bundles shared library dependencies on Linux and macOS through
auditwheel and delocate
* Runs the library test suite against the wheel-installed version of your
library
…On Friday, May 17, 2019, Bernát Gábor ***@***.***> wrote:
@giampaolo <https://github.com/giampaolo> Shouldn't manywheels project
solve this, aka building via that should make this work on Linux/Mac too?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#824?email_source=notifications&email_token=AAAMNS3XJOPKJAJVCS4HTFDPVZ43BA5CNFSM4CEUUURKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVUJHNQ#issuecomment-493392822>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAMNS55CTTNNQP5MLRMYQDPVZ43BANCNFSM4CEUUURA>
.
|
For me it would be enough to support linux. I think there are just too many other OSs (solaris, aix, ....). |
We can use Azure Pipelines to build all. |
How? |
The setup at https://github.com/MacPython/psutil is nearly complete - no? It builds macOS wheels too. I think you'll find there's a pretty big demand for macOS wheels. I personally find Azure pipelines pretty ugly to set up, compared to Travis and Appveyor - and you're nearly done, with https://github.com/MacPython/psutil - see MacPython/psutil#1 - and you'd have to solve those problems on Azure too. |
In my (short) experience with it, Azure Pipelines is far more elegant in design compared to Travis and Appveyor. It is, however, quite "green" as well so they may not have covered all their bases yet (and it has some minor issues too). But if I needed to run my CI on all three platforms, I would definitely use Azure Pipelines (which I have). |
I've tried Azure too - but I gave up after a while. Regardless, the barrier here is not the platform - you can use the same machinery on Travis and Azure - the barrier is getting the tests fixed over at MacPython/psutil#1 |
Does azure let you store the wheels somewhere so you can retrieve them via wget or something? |
Yeah, pipelines can generate artifacts that are attached to build. You can even define release stages afterwards to upload them to PyPi if the test stage succeeds (perhaps on git tag only/user button push). It's easy to get started and setup given we use tox via https://github.com/tox-dev/azure-pipelines-template (see example https://github.com/tox-dev/tox/blob/master/azure-pipelines.yml - example run https://dev.azure.com/toxdev/tox/_build/results?buildId=1766). @matthew-brett I would definitely recommend using the tox template to set up if you're using tox. Makes the config a lot simpler/easier. |
If I'm not mistaken the blocker here is #1126 (comment). Line 350 in fbece8e
...and that causes a segfault. So in order to proceed we should fix #1126 first. cPython, which also implements this functionality ( So fixing #1126 is controversial. I guess we may do a runtime check instead of the pre-processor / Also, there are other I may be able to try looking at this sometime later during this year. In the meantime, for posterity, any doc/tutorial on how to setup the old CentOS distro (docker?) is appreciated. |
@giampaolo - did you try the instructions at MacPython/psutil#1 (comment) ? Did they work? Let me know, I'm happy to extend / update them. |
The Manylinux2010 platform has just started rolling out a few weeks ago with an updated toolchain. That could potentially make the issue go away without intervention in this codebase, I guess. |
Manylinux2010 uses CentOS 6. Does CentOS 6 have the macro? |
@giampaolo Would you like help to automate deploy of wheels on PyPI via cibuildwheel ? If yes, with which CI service? |
I've set up a GitHub workflow to build wheels for Linux/macOS:
|
@huntzhan It would be awesome if you could upload those wheels to https://github.com/private-pypi/psutil/releases |
@rostrovsky |
It would be awesome to have an official manylinux wheel for psutil on PyPi. The environment where my app runs abstracts building of the docker image and doesn't allow the app to participate in the docker image build step; the only customization to the docker build that my app is allowed to do is to provide a requirements.txt file for python packages, and the apps are not allowed to |
Finally, macOS wheels are available, see #1550 (comment). |
This is a question: Is it possible to install psutil without gcc?
How much work would it be to port the code to ctypes (or other way to run without gcc)?
The text was updated successfully, but these errors were encountered: