maposmatic-dev
[Top][All Lists]
Advanced

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

Re: [Maposmatic-dev] [PATCH] [v2][ocitysmap] Mapnik 2+: update INSTALL a


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

On Wed, Apr 4, 2012 at 20:32, Maxime Petazzoni
<address@hidden> wrote:
>> -    tar xvjf mapnik-2.0.0.tar.bz2
>> -    cd mapnik-2.0.0
>> +    git checkout c88fcc8f046138fb9fb73bdb42dfed1e9c4b86cd # dated Tue Apr 3
>
> This must be run inside the git repository, so `cd mapnik` should be
> done beforehand.

Indeed, my bad.

>> +# Importing mapnik2 raises a DeprecationWarning as of mapnik
>> +# commit 14700dba16146902ca98fdcacb72b2fba4fa596a
>> +# As mapnik 2.1 (or git version with support for placement-type="simple")
>> +# is required for OCitySMap (see INSTALL), instead of importing mapnik2,
>> +# we import mapnik and assert it isn't an old version.
>> +import mapnik
>> +assert mapnik.mapnik_version >= 200000, "Mapnik module version %s too old, 
>> see ocitysmap's INSTALL for more details." \
>> +                                        % mapnik.mapnik_version_string()
>
> Can we wrap this a bit better? Also, you might want to use abbreviated
> commit IDs for readability (same remark in the INSTALL file above).

*nods* Will do

>> +import mapnik
>
> No assert here?
I understood from Thomas's remarks that those asserts weren't needed
because of what loads what, that is the two files with asserts would
have already had them fire.
I'll add them back in in those files, but keep the note to the two
files that now have them.

I'll also change the assert to check against 2.1-pre or later, as per
David's remarks about the printable stylesheet.

v3 of the patch will find its way to the list before too long. Thanks
for your review.

Best regards,
Jeroen

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



reply via email to

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