Skip to content

Commit

Permalink
giampaolo#704: psutil does not compile/cannot be imported on solaris …
Browse files Browse the repository at this point in the history
…sparc
  • Loading branch information
sebrestin committed Oct 28, 2015
1 parent 36316de commit f89aec2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,8 @@ I: 541
N: Mike Sarahan
W: https://github.com/msarahan
I: 688

N: Sebastian-Gabriel Brestin
C: Romania
E: sebastianbrestin@gmail.com
I: 704
8 changes: 8 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Bug tracker at https://github.com/giampaolo/psutil/issues

3.2.3 - 3015-10-28
==================

**Bug fixes**

- #704: psutil does not compile/cannot be imported on solaris sparc


3.2.3 - XXXX-XX-XX
==================

Expand Down
2 changes: 1 addition & 1 deletion psutil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
elif sys.platform.startswith("freebsd"):
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_IDLE, # NOQA
CONN_BOUND)
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
4 changes: 2 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 @@ -175,7 +175,7 @@ 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

0 comments on commit f89aec2

Please sign in to comment.