PFZheng / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

Make psutil-releases available on pypi. #349

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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 reported on code.google.com by wouter.v...@gmail.com on 9 Jan 2013 at 4:19

GoogleCodeExporter commented 8 years ago
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.

Original comment by geekad...@mgmiller.net on 16 Jan 2013 at 1:42

GoogleCodeExporter commented 8 years ago
@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.

Original comment by g.rodola on 16 Jan 2013 at 1:55

GoogleCodeExporter commented 8 years ago
(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).

Original comment by geekad...@mgmiller.net on 16 Jan 2013 at 4:18

GoogleCodeExporter commented 8 years ago
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?

Original comment by g.rodola on 16 Jan 2013 at 10:47

GoogleCodeExporter commented 8 years ago
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.

Original comment by geekad...@mgmiller.net on 16 Jan 2013 at 7:29

GoogleCodeExporter commented 8 years ago
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.

Original comment by g.rodola on 16 Jan 2013 at 7:42

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 16 Jan 2013 at 7:42

GoogleCodeExporter commented 8 years ago
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.

Original comment by geekad...@mgmiller.net on 16 Jan 2013 at 11:05

GoogleCodeExporter commented 8 years ago
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

Original comment by g.rodola on 17 Jan 2013 at 12:29