summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2016-01-31 18:39:30 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2016-01-31 18:39:30 +0100
commit033a7e9502b1764a1aa364d9a0bf28dad25aebb3 (patch)
treedbf22c8d2caebd10a344e76b15504fb8f53b27ed
parent75520ea96286f2c8683294ecab72298fc159be34 (diff)
parent7d5910530c13346e25a09ec6f28a2d511e0b21db (diff)
downloadpsutil-bsebi-master.tar.gz
merge from masterbsebi-master
-rw-r--r--CREDITS5
-rw-r--r--HISTORY.rst1
-rw-r--r--psutil/__init__.py2
-rw-r--r--psutil/_psutil_posix.c2
-rw-r--r--setup.py5
-rw-r--r--test/test_psutil.py2
6 files changed, 12 insertions, 5 deletions
diff --git a/CREDITS b/CREDITS
index 691bb1aa..7052fe3b 100644
--- a/CREDITS
+++ b/CREDITS
@@ -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
diff --git a/HISTORY.rst b/HISTORY.rst
index 05bfad59..d097d2af 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -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
diff --git a/psutil/__init__.py b/psutil/__init__.py
index e8c64087..86622e95 100644
--- a/psutil/__init__.py
+++ b/psutil/__init__.py
@@ -128,7 +128,7 @@ elif sys.platform.startswith("freebsd") or \
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
diff --git a/psutil/_psutil_posix.c b/psutil/_psutil_posix.c
index 55bfec9a..e56173d8 100644
--- a/psutil/_psutil_posix.c
+++ b/psutil/_psutil_posix.c
@@ -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
diff --git a/setup.py b/setup.py
index 4d4d8650..f7794211 100644
--- a/setup.py
+++ b/setup.py
@@ -71,7 +71,7 @@ if os.name == 'posix':
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')
@@ -202,7 +202,8 @@ elif sys.platform.startswith("linux"):
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'],
diff --git a/test/test_psutil.py b/test/test_psutil.py
index 356d7e87..947edcd3 100644
--- a/test/test_psutil.py
+++ b/test/test_psutil.py
@@ -117,7 +117,7 @@ FREEBSD = sys.platform.startswith("freebsd")
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/)