[Python-modules-team] Bug#676450: Bug#676450: python-psutil: FTBFS on Debian GNU/Hurd

Barry deFreese bdefreese at debian.org
Sun Jun 10 20:15:43 UTC 2012


On 6/8/2012 5:46 PM, Sandro Tosi wrote:
> Hello Barry,
> 
> On Thu, Jun 7, 2012 at 3:52 AM, Barry deFreese <bdefreese at debian.org> wrote:
>> Currently python-psutil fails to build on Debian GNU/Hurd. (Doesn't recognize gnu system).
>>
>> Attached is a patch for building on Hurd.
> 
> Thanks for the patch! But I think it's not enough: I've tried to build
> the package on exodar but the test suite fails to run due to:
> 
> running test/test_psutil.py on python2.7
> Traceback (most recent call last):
>   File "test/test_psutil.py", line 32, in <module>
>     import psutil
>   File "/home/morph/python-psutil-0.4.1/build/lib.gnu-0.3-i686-AT386-2.7/psutil/__init__.py",
> line 83, in <module>
>     raise NotImplementedError('platform %s is not supported' % sys.platform)
> NotImplementedError: platform gnu0 is not supported
> 
> Is it possible to you to follow up and let tests run too?
> 
> Cheers,
> 

Sandro,

I updated the patch but it still isn't quite right.  The _psposix code doesn't seem to include
__extra__all.  So I could use some advice.  Rather than trying to use posix should I be creating a
new set of platform files for GNU?

Thanks!

Barry



-------------- next part --------------
Index: python-psutil-0.4.1/setup.py
===================================================================
--- python-psutil-0.4.1.orig/setup.py	2012-06-10 10:24:51.000000000 +0000
+++ python-psutil-0.4.1/setup.py	2012-06-10 10:35:34.000000000 +0000
@@ -72,6 +72,12 @@
                             sources=['psutil/_psutil_linux.c'],
                             ),
                   posix_extension]
+# GNU
+elif sys.platform.lower().startswith("gnu"):
+    extensions = [Extension('_psutil_posix',
+                            sources=['psutil/_psutil_posix.c'],
+                            ),
+                  posix_extension]
 else:
     raise NotImplementedError('platform %s is not supported' % sys.platform)
 
Index: python-psutil-0.4.1/psutil/__init__.py
===================================================================
--- python-psutil-0.4.1.orig/psutil/__init__.py	2012-06-10 10:24:51.000000000 +0000
+++ python-psutil-0.4.1/psutil/__init__.py	2012-06-10 10:36:46.000000000 +0000
@@ -79,6 +79,9 @@
 elif sys.platform.lower().startswith("freebsd"):
     import psutil._psbsd as _psplatform
 
+elif sys.platform.lower().startswith("gnu"):
+    import psutil._psposix as _psplatform
+
 else:
     raise NotImplementedError('platform %s is not supported' % sys.platform)
 


More information about the Python-modules-team mailing list