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

Make psutil-releases available on pypi. #349

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

Make psutil-releases available on pypi. #349

giampaolo opened this issue May 23, 2014 · 9 comments

Comments

@giampaolo
Copy link
Owner

From wouter.v...@gmail.com on January 09, 2013 17:19:08

For easier installation of python-packages,
it always handy if they are released on pypi.

This instalation because as easy as:

 > pip install psutils

Now you explicitly need to lookup the download-url.

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

@giampaolo
Copy link
Owner Author

From geekad...@mgmiller.net on January 15, 2013 17:42:21

Agreed.  Was looking into porting a few tools of mine (on PYPI) to use this 
great package, but not installable via pip is a show-stopper.

It may be that the C extensions required for Windows support have to be 
compiled.  There are however easier ways to access the APIs such as ctypes.  
Not sure what the situation is with psutils because it didn't get installed but 
it would be great if a pure-python subset were installable via pip.

For now I guess I'll stick with dbus and ctypes, but handing this part over to 
a great package such as this would be best.

@giampaolo
Copy link
Owner Author

From g.rodola on January 15, 2013 17:55:41

@wouter.vanden.hove: 
assuming you're talking about UNIX you can already install psutil via 
easy_install or pip, you just misspelled the name of the package (it's 'psutil' 
not 'psutils').


@geekademy@mgmiller.net: 
are you suggesting to rewrite the Windows version in pure python + ctypes and 
get rid of the C extension module? If that's the case then the answer is no. 
The amount of work involved would be huge, same for the impact on the code 
stability (the current C-based version has been around for years), not to 
mention the fact that ctypes is fragile and I personally find it ugly to write 
code with it.

@giampaolo
Copy link
Owner Author

From geekad...@mgmiller.net on January 15, 2013 20:18:29

(Ooh, is there any way to keep my email address out of this bug tracker?)

Don't wanna nominate you for more work, but its possible.  I see you've done a 
lot of work for x-platform support, that is unfortunately unusable if not 
installable thru pypi.

It's a shame the whole thing isn't in the stdlib.   I saw you got a ctypes 
addition in, (though I find it odd in shutil).

@giampaolo
Copy link
Owner Author

From g.rodola on January 16, 2013 02:47:57

To change your email settings go to https://code.google.com/hosting/settings .
I understand not being able to use pip/easy_install is annoying, but that's a 
problem inherited from Windows not having a C compiler installed by default 
and/or not as easily installable as on most POSIX.
Please note that I think you can install one (e.g. mingw) and pip/easy_install 
should work.

> I saw you got a ctypes addition in, (though I find it odd in shutil).

What do you mean?

@giampaolo
Copy link
Owner Author

From geekad...@mgmiller.net on January 16, 2013 11:29:26

email:  I have the email set to obscured, but you got it somehow... they only 
chop a few letters so perhaps you guessed it?  Or there is a bug?

shutil:  Sorry, wasn't clear enough, I meant this: 
http://code.activestate.com/recipes/577972-disk-usage/ With the function going 
into shutil.  I find this whole psutil package useful, and find it odd that 
this piece made it into shutil, which has been a module for copying files, not 
system level info... it is changing into.  Cluttering shutil feels messy and a 
mistake, imho.  Stuff like that should go into its own module (if not psutil).  
The hardware/os environment has little to do with the "shell" per se.

Of course this is the wrong place to be discussing this, a few years ago in the 
pydev list would have been.

@giampaolo
Copy link
Owner Author

From g.rodola on January 16, 2013 11:42:35

email: oh ok I get it now - I'm able to see your full email address because I'm 
a project member. As an anonymous user (not logged in against google code) I 
see it obscured.

shutil: disk_usage() found its way into shutil module because it's intended for 
operations against files and directories in general, not just "copying files" 
(e.g. as of py 2.7 it introduced new APIs for dealing with archives).
Given that disk_usage() provides info about the disk a file/path belongs to, it 
seemed ok to me to propose it for inclusion into shutil module. Anyway, we're 
off topic. =)  
Closing this out because I'm not willing to rewrite Windows code by using ctypes.

Status: WontFix

@giampaolo
Copy link
Owner Author

From g.rodola on January 16, 2013 11:42:49

Labels: OpSys-Windows Usability

@giampaolo
Copy link
Owner Author

From geekad...@mgmiller.net on January 16, 2013 15:05:47

Does this sound like the place you'd look to query the terminal size or unpack 
a zip file?  ;) http://docs.python.org/3.3/library/shutil.html 11.9. shutil — 
High-level file operations¶

Source code: Lib/shutil.py

The shutil module offers a number of high-level operations on files and 
collections of files. In particular, functions are provided which support file 
copying and removal. For operations on individual files, see also the os module.

@giampaolo
Copy link
Owner Author

From g.rodola on January 16, 2013 16:29:23

The way I see it, shutil module stands for "shell utilities related to files 
and directories". In that perspective disk_usage(), which() and the 
archive-related functions look legitimate to me.  
shutil.get_terminal_size() is a bit different and might be a bit out of context indeed. 
There was a discussion about that (and I was involved as well) for this very 
reason, see: http://bugs.python.org/issue13609

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

1 participant