Skip to content
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

Distribution as wheel packages #505

Closed
giampaolo opened this issue May 23, 2014 · 7 comments
Closed

Distribution as wheel packages #505

giampaolo opened this issue May 23, 2014 · 7 comments

Comments

@giampaolo
Copy link
Owner

From [email protected] on May 19, 2014 11:24:46

Wheels ( https://pypi.python.org/pypi/wheel )  are the new standard of python 
distribution and are intended to replace eggs. (see: http://pythonwheels.com/ )

Please provide psutil package also as wheel packages (for windows).


To build an individual wheel, run ``python setup.py bdist_wheel``.
It is possible to create a wheel package without changing some source code (I 
dit not try it with psutil but with another project [psycopg2]):
After installing wheel this call is possible:

``python setup.py --command-packages wheel bdist_wheel``

(see: https://docs.python.org/2/distutils/extending.html )

Original issue: http://code.google.com/p/psutil/issues/detail?id=505

@giampaolo
Copy link
Owner Author

From g.rodola on May 19, 2014 02:41:59

This is something I've been meaning to investigate for a while now but never 
gotten around it 'cause I'm lazy.  =)
As for Windows: we already provide different .exe installers for each python 
version (2.4 -> 3.4, including 64-bit variants): 
https://pypi.python.org/pypi/psutil#downloads ...for a total of 9 .exe files 
every time a new version of psutil is released.
Does this mean we'll have to provide 9 .wheel files for Windows as well?

@giampaolo
Copy link
Owner Author

From [email protected] on May 22, 2014 11:21:53

I am not quite sure about the number of .wheel files to provide but I guess 
there will (also) be 9.

The wheel packages will also contain the compiled extensions but IMHO the 
installation is much easier: I prefer using requirement.txt files (as 
recommended for pip).

pip 1.5.x defaults to preferring packages in a wheel format so I could install 
all packages with 'pip install -r requirements.txt'.

On MS Windows this is not possible today - several packages depend on c 
extensions and want to be compiled at installation. This requires the 
installation on some kind of Visual Studio (2008 and up). This is possible on a 
development machine but not in production. And even on development machines 
sometimes it would be too much effort to fulfill the requirements for compiling 
this c extensions.
Some package (like psutil) already provide precompiled packages - but there is 
always  the extra step of downloading the package manually and executing it or 
(like I have to do in some projects) add a comment in the requirement.txt and 
prepare my virtualenv before I can lean back and watch 'pip install -r 
requirement.txt' do its work.

This will be the main benefit of providing wheel packages (for me): I do not 
have to worry which packages I manually have to install.

Moreover: You want a green field around psutil on http://pythonwheels.com/! ;-)

@shealutton
Copy link

Good discussion of the pros and cons for a .whl version. I would add that I would like to distribute this to several thousand windows servers. Today there is no way to silently install the .exe files for windows and it will not be possible for me to install them manually on that many systems. A .whl file would allow for me to start using psutils on a mass scale and without it I will simply have to rewrite my application to use something else.

@joroy
Copy link

joroy commented Jul 1, 2014

If we could upvote an issue/request in github, I would vote for this one!
I also need a whl for windows build to avoid installing the exe manually.

@bladeoflight16
Copy link

@shealutton

Today there is no way to silently install the .exe files for windows and it will not be possible for me to install them manually on that many systems.

Have you given this command a try: easy_install psutil-0.6.1.win32-py2.7.exe? If it works, it's also works great for vitualenvs. See http://stackoverflow.com/a/16599199/1394393. Not all Python Windows binaries work with that, but enough of them do that's very useful. You might also be able to provide a URL to the exe instead of downloading the exe before hand, but I can't recall if that's correct offhand.

@joroy
Copy link

joroy commented Jul 7, 2014

It appears that we can easily convert the win*.exe file to wheel container with:
wheel convert {path_to_installer}
Then I pushed the wheel file to my local pypi server and now I can easily install with pip install.

@giampaolo
Copy link
Owner Author

OK, psutil 2.1.2 is out and wheels for Windows are finally available.
I didn't create a wheel package for the source distribution 'cause I think it's useless but I may be wrong, in which case feel free to comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants