[DebianGIS-dev] Bug#599330: python-mapnik: broken on mips*: ImportError: invalid mode parameter

2010-10-09 Thread David Paleino
On Sat, 9 Oct 2010 12:22:09 +0200, David Paleino wrote:

> On Wed, 6 Oct 2010 19:25:58 +0200, Jakub Wilk wrote:
> 
> > mapnik is not importable on mips{,el}:
> > 
> > $ python -c 'import mapnik'
> > Traceback (most recent call last):
> >File "", line 1, in 
> >File "/usr/lib/pymodules/python2.6/mapnik/__init__.py", line 53, in
> >  from _mapnik import *
> > ImportError: invalid mode parameter
> > 
> > 
> > I believe that the attached (untested) patch fixes this bug.
> 
> Probably not, since the error happens later than what you patched (and it
> also has an "except ImportError", so that traceback shouldn't have happened
> at all, if that was the point of failure).
> 
> I'll investigate this more.

Seems like you were right. :)

Preparing an upload with your patch included, thank you.

David

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 | http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174


signature.asc
Description: PGP signature
___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel

[DebianGIS-dev] Bug#599330: python-mapnik: broken on mips*: ImportError: invalid mode parameter

2010-10-09 Thread David Paleino
Hello Jakub,

On Wed, 6 Oct 2010 19:25:58 +0200, Jakub Wilk wrote:

> mapnik is not importable on mips{,el}:
> 
> $ python -c 'import mapnik'
> Traceback (most recent call last):
>File "", line 1, in 
>File "/usr/lib/pymodules/python2.6/mapnik/__init__.py", line 53, in
>  from _mapnik import *
> ImportError: invalid mode parameter
> 
> 
> I believe that the attached (untested) patch fixes this bug.

Probably not, since the error happens later than what you patched (and it
also has an "except ImportError", so that traceback shouldn't have happened
at all, if that was the point of failure).

I'll investigate this more.

Thank you,
David

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 | http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174


signature.asc
Description: PGP signature
___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel

[DebianGIS-dev] Bug#599330: python-mapnik: broken on mips*: ImportError: invalid mode parameter

2010-10-06 Thread Jakub Wilk

Package: python-mapnik
Version: 0.7.1-1
Severity: grave
Tags: patch
User: debian-m...@lists.debian.org
Usertags: mips
Justification: renders package unusable (on mips & mipsel)

mapnik is not importable on mips{,el}:

$ python -c 'import mapnik'
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/pymodules/python2.6/mapnik/__init__.py", line 53, in 
from _mapnik import *
ImportError: invalid mode parameter


I believe that the attached (untested) patch fixes this bug.

BTW, such a breakage could be detected earlier if test suite were run at 
build time.


--
Jakub Wilk
diff --git a/bindings/python/mapnik/__init__.py b/bindings/python/mapnik/__init__.py
--- a/bindings/python/mapnik/__init__.py
+++ b/bindings/python/mapnik/__init__.py
@@ -42,7 +42,7 @@
 
 from sys import getdlopenflags, setdlopenflags
 try:
-from ctypes import RTLD_NOW, RTLD_GLOBAL
+from DLFCN import RTLD_NOW, RTLD_GLOBAL
 except ImportError:
 RTLD_NOW = 2
 RTLD_GLOBAL = 256


signature.asc
Description: Digital signature
___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel