huberf / pybluez

Automatically exported from code.google.com/p/pybluez
0 stars 0 forks source link

not detected linux as platform #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use library on linux with kernel 3.XXXX 

in file __init__.py in line 35, platform linux detecting by "linux2", but new 
kernel is "linux3"

please add "linux3" to line.

Original issue reported on code.google.com by gankov...@gmail.com on 22 Aug 2011 at 6:38

GoogleCodeExporter commented 8 years ago
And may be need some error if platform not detected.

Original comment by gankov...@gmail.com on 22 Aug 2011 at 6:42

GoogleCodeExporter commented 8 years ago
Nota bene:

This only happens when python is compiled while one is running a 3.x kernel.

If you compile python while running a 2.6-kernel and subsequently upgrade to 
3.x, sys.platform will still be 'linux2'.

Original comment by wic...@gavagai.eu on 8 Sep 2011 at 9:53

GoogleCodeExporter commented 8 years ago
Here's a patch.
setup.py also needed patching, as it would not build _bluetooth.so under linux3.

http://mestvaelt.gavagai.nl:8080/file/895c273d61b5/dev-python/pybluez/files/linu
x3.patch

Original comment by wic...@gavagai.eu on 8 Sep 2011 at 10:48

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks, I committed this patch in SVN r54

Original comment by lukas.he...@gmail.com on 18 Sep 2011 at 9:10

GoogleCodeExporter commented 8 years ago
Root cause seems to have been fixed in python2.7:

http://hg.python.org/cpython/rev/c816479f6aaf/
http://bugs.python.org/issue12326

Breakage would be re-introduced in python-3.3, because that version wil 
introduce 'linux' as sys.platform. That change happens to be compatible with 
the patch, so hurray :-)

Original comment by wic...@gavagai.eu on 23 Nov 2011 at 2:14