[mapserver-dev] Python 3 classes missing

Schindler, Fabian fabian.schindler at eox.at
Mon Feb 10 00:46:57 PST 2020


Hi Seth,

To clarify: I used the packaged version, where I experienced the issue,
then tried to build the package myself and had the same issue. There is no
CMake involved, it seems like the compiled SWIG files are linked to the
systems mapserver-devel package. The source just seems to be the Python
part of mapscript and does not include source code of the core mapserver.

Thanks for the response,
Fabian

On Sun, 9 Feb 2020 at 00:18, Seth G <sethg at geographika.co.uk> wrote:

> Hi Fabian,
>
> When you say you got a packaged MapScript - why do you need to rebuild?
> Shouldn't the mapscript.py and _mapscript.so already be part of the
> package, so you can just drop them into your Python path?
>
> If you are building from source you'll probably need to use CMake. You can
> also build Wheels CMake and SWIG - see https://pypi.org/project/mapscript/
>
> Regards,
>
> Seth
>
> --
> web:http://geographika.co.uk
> twitter: @geographika
>
>
> On Fri, Feb 7, 2020, at 9:46 AM, Schindler, Fabian wrote:
>
> Hi all,
>
> I'm experiencing a strange issue when using an RPM-packaged mapscript on
> CentOS 7. I'm building against version 7.4.3.
>
> When I import the python package, it seems that all classes are missing
> from that package, whereas all instance methods (or their SWIG interfaces)
> all seem to be there. For example the `mapObj`:
>
> >>> [item for item in dir(mapscript) if 'mapObj' in item]
> ['delete_mapObj', 'mapObj_OWSDispatch', 'mapObj_appendOutputFormat',
> 'mapObj_applyConfigOptions', 'mapObj_applySLD', 'mapObj_applySLDURL',
> 'mapObj_cellsize_get', 'mapObj_cellsize_set', 'mapObj_clone',
> 'mapObj_configoptions_get', 'mapObj_convertToString',
> 'mapObj_datapattern_get', 'mapObj_datapattern_set', 'mapObj_debug_get',
> 'mapObj_debug_set', 'mapObj_defresolution_get', 'mapObj_defresolution_set',
> 'mapObj_draw', 'mapObj_drawLabelCache', 'mapObj_drawLegend',
> 'mapObj_drawQuery', 'mapObj_drawReferenceMap', 'mapObj_drawScalebar',
> 'mapObj_embedLegend', 'mapObj_embedScalebar', 'mapObj_extent_get',
> 'mapObj_extent_set', 'mapObj_fontset_get', 'mapObj_freeQuery',
> 'mapObj_generateSLD', 'mapObj_getConfigOption',
> 'mapObj_getFirstMetaDataKey', 'mapObj_getLayer', 'mapObj_getLayerByName',
> 'mapObj_getLayerOrder', 'mapObj_getLayersDrawingOrder',
> 'mapObj_getMetaData', 'mapObj_getNextMetaDataKey', 'mapObj_getNumSymbols',
> 'mapObj_getOutputFormat', 'mapObj_getOutputFormatByName',
> 'mapObj_getProjection', 'mapObj_getSize', 'mapObj_getSymbolByName',
> 'mapObj_height_get', 'mapObj_height_set', 'mapObj_imagecolor_get',
> 'mapObj_imagecolor_set', 'mapObj_imagequality_get',
> 'mapObj_imagequality_set', 'mapObj_imagetype_get', 'mapObj_insertLayer',
> 'mapObj_interlace_get', 'mapObj_interlace_set', 'mapObj_labelcache_get',
> 'mapObj_layerorder_get', 'mapObj_layerorder_set', 'mapObj_legend_get',
> 'mapObj_loadMapContext', 'mapObj_loadOWSParameters', 'mapObj_loadQuery',
> 'mapObj_mappath_get', 'mapObj_mappath_set', 'mapObj_maxlayers_get',
> 'mapObj_maxsize_get', 'mapObj_maxsize_set', 'mapObj_moveLayerDown',
> 'mapObj_moveLayerUp', 'mapObj_name_get', 'mapObj_name_set',
> 'mapObj_numlayers_get', 'mapObj_numoutputformats_get',
> 'mapObj_offsetExtent', 'mapObj_outputformat_get', 'mapObj_prepareImage',
> 'mapObj_prepareQuery', 'mapObj_processLegendTemplate',
> 'mapObj_processQueryTemplate', 'mapObj_processTemplate',
> 'mapObj_queryByFeatures', 'mapObj_queryByFilter', 'mapObj_queryByPoint',
> 'mapObj_queryByRect', 'mapObj_queryByShape', 'mapObj_querymap_get',
> 'mapObj_refcount_get', 'mapObj_reference_get', 'mapObj_removeLayer',
> 'mapObj_removeMetaData', 'mapObj_removeOutputFormat',
> 'mapObj_resolution_get', 'mapObj_resolution_set', 'mapObj_save',
> 'mapObj_saveMapContext', 'mapObj_saveQuery', 'mapObj_saveQueryAsGML',
> 'mapObj_scaleExtent', 'mapObj_scalebar_get', 'mapObj_scaledenom_get',
> 'mapObj_scaledenom_set', 'mapObj_selectOutputFormat', 'mapObj_setCenter',
> 'mapObj_setConfigOption', 'mapObj_setExtent', 'mapObj_setFontSet',
> 'mapObj_setImageType', 'mapObj_setLayerOrder',
> 'mapObj_setLayersDrawingOrder', 'mapObj_setMetaData',
> 'mapObj_setOutputFormat', 'mapObj_setProjection', 'mapObj_setRotation',
> 'mapObj_setSize', 'mapObj_setSymbolSet', 'mapObj_setWKTProjection',
> 'mapObj_shapepath_get', 'mapObj_shapepath_set', 'mapObj_status_get',
> 'mapObj_status_set', 'mapObj_swigregister', 'mapObj_symbolset_get',
> 'mapObj_templatepattern_get', 'mapObj_templatepattern_set',
> 'mapObj_transparent_get', 'mapObj_transparent_set', 'mapObj_units_get',
> 'mapObj_units_set', 'mapObj_web_get', 'mapObj_width_get',
> 'mapObj_width_set', 'mapObj_zoomPoint', 'mapObj_zoomRectangle',
> 'mapObj_zoomScale', 'new_mapObj']
>
>
> I'm using swig3-3.0.12-17 and the package is built with a simple `python3
> setup.py build`.
>
> Any hints on what may be wrong here?
>
> Regards,
> Fabian
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20200210/7d734015/attachment.html>


More information about the mapserver-dev mailing list