From f89aec2e56e1e1e503a6292850048bbea6de31a1 Mon Sep 17 00:00:00 2001 From: bsebi Date: Wed, 28 Oct 2015 18:50:41 +0200 Subject: #704: psutil does not compile/cannot be imported on solaris sparc --- CREDITS | 5 +++++ HISTORY.rst | 8 ++++++++ psutil/__init__.py | 2 +- psutil/_psutil_posix.c | 2 +- setup.py | 4 ++-- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CREDITS b/CREDITS index ef4f432c..d7815ba3 100644 --- a/CREDITS +++ b/CREDITS @@ -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 \ No newline at end of file diff --git a/HISTORY.rst b/HISTORY.rst index 7deb5d32..e231f6e4 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -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 ================== diff --git a/psutil/__init__.py b/psutil/__init__.py index 1a75a9f9..2343391c 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -121,7 +121,7 @@ elif sys.platform.startswith("darwin"): 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) diff --git a/psutil/_psutil_posix.c b/psutil/_psutil_posix.c index 1e27cdb0..1dfbcf45 100644 --- a/psutil/_psutil_posix.c +++ b/psutil/_psutil_posix.c @@ -16,7 +16,7 @@ #include #ifdef PSUTIL_SUNOS10 -#include "arch/solaris10/ifaddrs.h" +#include "arch/solaris/v10/ifaddrs.h" #else #include #endif diff --git a/setup.py b/setup.py index 3cb2dd63..8ff41d31 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') @@ -175,7 +175,7 @@ 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'], -- cgit v1.2.1 From a0355231afeadb5be1575ddd66c61a240a0e29f2 Mon Sep 17 00:00:00 2001 From: bsebi Date: Wed, 28 Oct 2015 19:02:46 +0200 Subject: line too long failure --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8ff41d31..e6ea276b 100644 --- a/setup.py +++ b/setup.py @@ -175,7 +175,8 @@ elif sys.platform.startswith("linux"): define_macros=macros) extensions = [ext, posix_extension] # Solaris -elif sys.platform.lower().startswith('sunos') or sys.platform.lower().startswith('solaris'): +elif sys.platform.lower().startswith('sunos') or \ + sys.platform.lower().startswith('solaris'): ext = Extension( 'psutil._psutil_sunos', sources=['psutil/_psutil_sunos.c'], -- cgit v1.2.1 From 431844fa00b61cdbc94ae8514ea8cc2abd7f25f5 Mon Sep 17 00:00:00 2001 From: bsebi Date: Wed, 28 Oct 2015 19:08:26 +0200 Subject: removing release - date header --- HISTORY.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index e231f6e4..191404b1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,7 +1,5 @@ Bug tracker at https://github.com/giampaolo/psutil/issues -3.2.3 - 3015-10-28 -================== **Bug fixes** -- cgit v1.2.1 From 7d5910530c13346e25a09ec6f28a2d511e0b21db Mon Sep 17 00:00:00 2001 From: bsebi Date: Wed, 28 Oct 2015 20:10:04 +0200 Subject: improved solaris check for unit test as well --- test/test_psutil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_psutil.py b/test/test_psutil.py index 62fc5114..e412dd13 100644 --- a/test/test_psutil.py +++ b/test/test_psutil.py @@ -105,7 +105,7 @@ if WINDOWS: LINUX = sys.platform.startswith("linux") OSX = sys.platform.startswith("darwin") BSD = sys.platform.startswith("freebsd") -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/) -- cgit v1.2.1