maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maposmatic-dev] [PATCH] [ocitysmap] Mapnik 2+: update INSTALL and g


From: Jeroen van Rijn
Subject: Re: [Maposmatic-dev] [PATCH] [ocitysmap] Mapnik 2+: update INSTALL and get rid of DeprecationWarning
Date: Wed, 4 Apr 2012 13:33:10 +0200

On Wed, Apr 4, 2012 at 13:18, Thomas Petazzoni
<address@hidden> wrote:
> Hello,
>
> Le Wed,  4 Apr 2012 12:55:30 +0200,
> Jeroen van Rijn <address@hidden> a écrit :
>
>> As of mapnik commit 14700dba16146902ca98fdcacb72b2fba4fa596a,
>> using 'import mapnik2' raises a DeprecationWarning.
>> See https://github.com/mapnik/mapnik/issues/941 for details.
>>
>> Update imports of the mapnik module to use 'import mapnik' and assert
>> that the installed version is new enough.
>>
>> Tested-by: Jeroen van Rijn <address@hidden>
>> Signed-off-by: Jeroen van Rijn <address@hidden>
>
> Thanks, looks good. Are you sure that Mapnik 2.0.0 actually accepts of
> being loaded with "import mapnik" ? I thought that Mapnik 2.0.0 could
> only be imported with "import mapnik2" and that the change back to
> "import mapnik" has been done after the 2.0.0 release (i.e, available
> in the Git repo and the upcoming 2.1.0 release).
>
> Can you confirm that?

Good point. I'll have to check, as I'm running mapnik from git myself.
I'll get back to you on this later today.
I'll test both the 2.0.0 release mentioned in the INSTALL, as well as
the version packaged by Oneiric:

Package: python-mapnik
New: yes
State: not installed
Version: 2.0.0+dev20120120.git.e7fdf1f-1~oneiric1
Priority: optional
Section: python

Looking at that date, it just might already have the commit in question.
I suppose we could also proscribe the use of mapnik git to install it
and on each release of ocitysmap update INSTALL to mention a
succesfully tested commit? e.g.

8. Install Mapnik
git clone ...

If you come across any problems whilst installing or running mapnik,
you can do this:
git checkout c88fcc8f046138fb9fb73bdb42dfed1e9c4b86cd # ocitysmap has
been tested to work reliably with this commit

> It's also a bit annoying that this comment+import+assert is duplicated
> 5 times. Maybe only the imports in coords.py and map_canvas.py are
> needed?

True. I wasn't entirely certain what ocitysmap module called what in
which order, hence replacing the imports wholesale. I'll have a stab
at figuring out the call chain and see where those comments and
asserts could be dropped.

New version of the patch coming tonight or tomorrow, unless of course
the mapnik 2.0.0 tarball release turns out not to support 'import
mapnik', in which case it would moot the patch :(

Best regards,
Jeroen


-- 
↑↑↓↓←→←→BA[Start]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]