Skip to content

Commit

Permalink
merge from master
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Jan 31, 2016
2 parents 75520ea + 7d59105 commit 033a7e9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,8 @@ I: 732, 733
N: Visa Hankala
E: visa@openbsd.org
I: 741

N: Sebastian-Gabriel Brestin
C: Romania
E: sebastianbrestin@gmail.com
I: 704
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Bug tracker at https://github.com/giampaolo/psutil/issues
- #737: [Windows] when the bitness of psutil and the target process was
different cmdline() and cwd() could return a wrong result or incorrectly
report an AccessDenied error.
- #704: psutil does not compile/cannot be imported on solaris sparc


3.4.2 - 2016-01-20
Expand Down
2 changes: 1 addition & 1 deletion psutil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
sys.platform.startswith("netbsd"):
from . import _psbsd as _psplatform

elif sys.platform.startswith("sunos"):
elif sys.platform.startswith("sunos") or sys.platform.startswith("solaris"):
from . import _pssunos as _psplatform
from ._pssunos import CONN_BOUND # NOQA
from ._pssunos import CONN_IDLE # NOQA
Expand Down
2 changes: 1 addition & 1 deletion psutil/_psutil_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <net/if.h>

#ifdef PSUTIL_SUNOS10
#include "arch/solaris10/ifaddrs.h"
#include "arch/solaris/v10/ifaddrs.h"
#else
#include <ifaddrs.h>
#endif
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def write(self, s):
posix_extension = Extension(
'psutil._psutil_posix',
sources=['psutil/_psutil_posix.c'])
if sys.platform.startswith("sunos"):
if sys.platform.startswith("sunos") or sys.platform.startswith("solaris"):
posix_extension.libraries.append('socket')
if platform.release() == '5.10':
posix_extension.sources.append('psutil/arch/solaris/v10/ifaddrs.c')
Expand Down Expand Up @@ -202,7 +202,8 @@ def on_exit():
define_macros=macros)
extensions = [ext, posix_extension]
# Solaris
elif sys.platform.lower().startswith('sunos'):
elif sys.platform.lower().startswith('sunos') or \
sys.platform.lower().startswith('solaris'):
ext = Extension(
'psutil._psutil_sunos',
sources=['psutil/_psutil_sunos.c'],
Expand Down
2 changes: 1 addition & 1 deletion test/test_psutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
OPENBSD = sys.platform.startswith("openbsd")
NETBSD = sys.platform.startswith("netbsd")
BSD = FREEBSD or OPENBSD or NETBSD
SUNOS = sys.platform.startswith("sunos")
SUNOS = sys.platform.startswith("sunos") or sys.platform.startswith("solaris")
VALID_PROC_STATUSES = [getattr(psutil, x) for x in dir(psutil)
if x.startswith('STATUS_')]
# whether we're running this test suite on Travis (https://travis-ci.org/)
Expand Down

0 comments on commit 033a7e9

Please sign in to comment.