Python MapScript

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Python MapScript

Seth G-2
Hi list,

I'd like to continue the push in cleaning up the Python MapScript bindings,  and getting a release to PyPi (for Python 2 and 3).
There are a number of things that can be removed as part of this, but I'd like to get opinions, points of view, and clarifications on a few things.

- as I understand it the GD rendered has been removed since v7.0 of MapServer. This means the "USE_GD" flag will always be 0, and therefore the pygdioctx additional code can be removed? https://github.com/mapserver/mapserver/blob/master/mapscript/python/pygdioctx/pygdioctx.h#L50
- cmake is now used to build the Python bindings so (please correct any incorrect assumptions) all the custom code in https://github.com/mapserver/mapserver/blob/master/mapscript/python/setup.py is now redundant, and a much simpler setup.py can be written to create wheels to upload to PyPI.
- Python3 bindings only seem to work correctly with newer versions of SWIG. Is there any minimum we need to support? The C# ones only seem to compile with 1.3.x - but fixing this doesn't seem insurmountable. Ideally we can say only v3+ is officially supported.
- The Python MapScript README is now 11 years old and refers to Python 2.2 - this can be extensively rewritten, and published as part of a PyPI release.

Does the above warrant a RFC?

Regards,

Seth

--
web:http://geographika.co.uk
twitter: @geographika
_______________________________________________
mapserver-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Python MapScript

Howard Butler-3
+1 to all of it, and I don't think you need an RFC to do any of it.

On Sat, Apr 7, 2018 at 1:29 PM, Seth G <[hidden email]> wrote:

> Hi list,
>
> I'd like to continue the push in cleaning up the Python MapScript bindings,  and getting a release to PyPi (for Python 2 and 3).
> There are a number of things that can be removed as part of this, but I'd like to get opinions, points of view, and clarifications on a few things.
>
> - as I understand it the GD rendered has been removed since v7.0 of MapServer. This means the "USE_GD" flag will always be 0, and therefore the pygdioctx additional code can be removed? https://github.com/mapserver/mapserver/blob/master/mapscript/python/pygdioctx/pygdioctx.h#L50
> - cmake is now used to build the Python bindings so (please correct any incorrect assumptions) all the custom code in https://github.com/mapserver/mapserver/blob/master/mapscript/python/setup.py is now redundant, and a much simpler setup.py can be written to create wheels to upload to PyPI.
> - Python3 bindings only seem to work correctly with newer versions of SWIG. Is there any minimum we need to support? The C# ones only seem to compile with 1.3.x - but fixing this doesn't seem insurmountable. Ideally we can say only v3+ is officially supported.
> - The Python MapScript README is now 11 years old and refers to Python 2.2 - this can be extensively rewritten, and published as part of a PyPI release.
>
> Does the above warrant a RFC?
>
> Regards,
>
> Seth
>
> --
> web:http://geographika.co.uk
> twitter: @geographika
> _______________________________________________
> mapserver-dev mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
_______________________________________________
mapserver-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Python MapScript

Tom Kralidis
+1 echo Howard. Happy to help where I can on this one.

..Tom

Sent from my iPhone

> On Apr 9, 2018, at 09:48, Howard Butler <[hidden email]> wrote:
>
> +1 to all of it, and I don't think you need an RFC to do any of it.
>
>> On Sat, Apr 7, 2018 at 1:29 PM, Seth G <[hidden email]> wrote:
>> Hi list,
>>
>> I'd like to continue the push in cleaning up the Python MapScript bindings,  and getting a release to PyPi (for Python 2 and 3).
>> There are a number of things that can be removed as part of this, but I'd like to get opinions, points of view, and clarifications on a few things.
>>
>> - as I understand it the GD rendered has been removed since v7.0 of MapServer. This means the "USE_GD" flag will always be 0, and therefore the pygdioctx additional code can be removed? https://github.com/mapserver/mapserver/blob/master/mapscript/python/pygdioctx/pygdioctx.h#L50
>> - cmake is now used to build the Python bindings so (please correct any incorrect assumptions) all the custom code in https://github.com/mapserver/mapserver/blob/master/mapscript/python/setup.py is now redundant, and a much simpler setup.py can be written to create wheels to upload to PyPI.
>> - Python3 bindings only seem to work correctly with newer versions of SWIG. Is there any minimum we need to support? The C# ones only seem to compile with 1.3.x - but fixing this doesn't seem insurmountable. Ideally we can say only v3+ is officially supported.
>> - The Python MapScript README is now 11 years old and refers to Python 2.2 - this can be extensively rewritten, and published as part of a PyPI release.
>>
>> Does the above warrant a RFC?
>>
>> Regards,
>>
>> Seth
>>
>> --
>> web:http://geographika.co.uk
>> twitter: @geographika
>> _______________________________________________
>> mapserver-dev mailing list
>> [hidden email]
>> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
> _______________________________________________
> mapserver-dev mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
_______________________________________________
mapserver-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Python MapScript

Lime, Steve D (MNIT)
Agree'd... No RFC necessary - especially since your talking about at least some documentation updates.

As for Swig versions, swig 3.0 is almost 4 years old and would be a reasonable target IMHO. I'm assuming that the PHP7 bindings also require a newer version. Finding someone to adopt the C# bindings might be a challenge. It would be nice if all bindings compiled under 3.x as part of the 7.2 release.

--Steve

-----Original Message-----
From: mapserver-dev [mailto:[hidden email]] On Behalf Of Tom Kralidis
Sent: Monday, April 09, 2018 4:27 PM
To: Howard Butler <[hidden email]>
Cc: [hidden email] Mailing List <[hidden email]>
Subject: Re: [mapserver-dev] Python MapScript

+1 echo Howard. Happy to help where I can on this one.

..Tom

Sent from my iPhone

> On Apr 9, 2018, at 09:48, Howard Butler <[hidden email]> wrote:
>
> +1 to all of it, and I don't think you need an RFC to do any of it.
>
>> On Sat, Apr 7, 2018 at 1:29 PM, Seth G <[hidden email]> wrote:
>> Hi list,
>>
>> I'd like to continue the push in cleaning up the Python MapScript bindings,  and getting a release to PyPi (for Python 2 and 3).
>> There are a number of things that can be removed as part of this, but I'd like to get opinions, points of view, and clarifications on a few things.
>>
>> - as I understand it the GD rendered has been removed since v7.0 of MapServer. This means the "USE_GD" flag will always be 0, and therefore the pygdioctx additional code can be removed? https://github.com/mapserver/mapserver/blob/master/mapscript/python/pygdioctx/pygdioctx.h#L50
>> - cmake is now used to build the Python bindings so (please correct any incorrect assumptions) all the custom code in https://github.com/mapserver/mapserver/blob/master/mapscript/python/setup.py is now redundant, and a much simpler setup.py can be written to create wheels to upload to PyPI.
>> - Python3 bindings only seem to work correctly with newer versions of SWIG. Is there any minimum we need to support? The C# ones only seem to compile with 1.3.x - but fixing this doesn't seem insurmountable. Ideally we can say only v3+ is officially supported.
>> - The Python MapScript README is now 11 years old and refers to Python 2.2 - this can be extensively rewritten, and published as part of a PyPI release.
>>
>> Does the above warrant a RFC?
>>
>> Regards,
>>
>> Seth
>>
>> --
>> web:http://geographika.co.uk
>> twitter: @geographika
>> _______________________________________________
>> mapserver-dev mailing list
>> [hidden email]
>> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
> _______________________________________________
> mapserver-dev mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
_______________________________________________
mapserver-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-dev
_______________________________________________
mapserver-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Python MapScript

Seth G-2
Thanks all for the support. The full test suite is being resurrected which will help check which parts of the API have changed from the docs (thanks to @claudep - see https://github.com/mapserver/mapserver/pull/5572).

One question it would be good to get input on is for versioning. In PyPI you can only change deployment packages by changing version number.

I'd propose versioning following MapServer versioning (as the package will need to match the binaries), with an additional descriptor at the end to allow for some beta releases and patches. This follows  PEP 440 guidelines [1].

e.g. 7.0.7a1, 7.0.7rc1, 7.0.7, 7.0.7.post1 etc.

Seth

[1] https://packaging.python.org/tutorials/distributing-packages/#standards-compliance-for-interoperability

--
web:http://geographika.co.uk
twitter: @geographika

On Tue, Apr 10, 2018, at 4:58 PM, Lime, Steve D (MNIT) wrote:

> Agree'd... No RFC necessary - especially since your talking about at
> least some documentation updates.
>
> As for Swig versions, swig 3.0 is almost 4 years old and would be a
> reasonable target IMHO. I'm assuming that the PHP7 bindings also require
> a newer version. Finding someone to adopt the C# bindings might be a
> challenge. It would be nice if all bindings compiled under 3.x as part
> of the 7.2 release.
>
> --Steve
>
> -----Original Message-----
> From: mapserver-dev [mailto:[hidden email]] On
> Behalf Of Tom Kralidis
> Sent: Monday, April 09, 2018 4:27 PM
> To: Howard Butler <[hidden email]>
> Cc: [hidden email] Mailing List <mapserver-
> [hidden email]>
> Subject: Re: [mapserver-dev] Python MapScript
>
> +1 echo Howard. Happy to help where I can on this one.
>
> ..Tom
>
> Sent from my iPhone
>
> > On Apr 9, 2018, at 09:48, Howard Butler <[hidden email]> wrote:
> >
> > +1 to all of it, and I don't think you need an RFC to do any of it.
> >
> >> On Sat, Apr 7, 2018 at 1:29 PM, Seth G <[hidden email]> wrote:
> >> Hi list,
> >>
> >> I'd like to continue the push in cleaning up the Python MapScript bindings,  and getting a release to PyPi (for Python 2 and 3).
> >> There are a number of things that can be removed as part of this, but I'd like to get opinions, points of view, and clarifications on a few things.
> >>
> >> - as I understand it the GD rendered has been removed since v7.0 of MapServer. This means the "USE_GD" flag will always be 0, and therefore the pygdioctx additional code can be removed? https://github.com/mapserver/mapserver/blob/master/mapscript/python/pygdioctx/pygdioctx.h#L50
> >> - cmake is now used to build the Python bindings so (please correct any incorrect assumptions) all the custom code in https://github.com/mapserver/mapserver/blob/master/mapscript/python/setup.py is now redundant, and a much simpler setup.py can be written to create wheels to upload to PyPI.
> >> - Python3 bindings only seem to work correctly with newer versions of SWIG. Is there any minimum we need to support? The C# ones only seem to compile with 1.3.x - but fixing this doesn't seem insurmountable. Ideally we can say only v3+ is officially supported.
> >> - The Python MapScript README is now 11 years old and refers to Python 2.2 - this can be extensively rewritten, and published as part of a PyPI release.
> >>
> >> Does the above warrant a RFC?
> >>
> >> Regards,
> >>
> >> Seth
> >>
> >> --
> >> web:http://geographika.co.uk
> >> twitter: @geographika
> >> _______________________________________________
> >> mapserver-dev mailing list
> >> [hidden email]
> >> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
> > _______________________________________________
> > mapserver-dev mailing list
> > [hidden email]
> > https://lists.osgeo.org/mailman/listinfo/mapserver-dev
> _______________________________________________
> mapserver-dev mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
> _______________________________________________
> mapserver-dev mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
_______________________________________________
mapserver-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Python MapScript

Bruno Friedmann-2
On mardi, 10 avril 2018 19.43:37 h CEST Seth G wrote:

> Thanks all for the support. The full test suite is being resurrected which
> will help check which parts of the API have changed from the docs (thanks
> to @claudep - see https://github.com/mapserver/mapserver/pull/5572).
>
> One question it would be good to get input on is for versioning. In PyPI you
> can only change deployment packages by changing version number.
>
> I'd propose versioning following MapServer versioning (as the package will
> need to match the binaries), with an additional descriptor at the end to
> allow for some beta releases and patches. This follows  PEP 440 guidelines
> [1].
>
> e.g. 7.0.7a1, 7.0.7rc1, 7.0.7, 7.0.7.post1 etc.
>
> Seth
>
> [1]
> https://packaging.python.org/tutorials/distributing-packages/#standards-com
> pliance-for-interoperability
>

I'm not over fan of 7a1 etc as in rpm term it means > 7

I prefer the way a numerous project (Gnome, KDE) used as 7.1.7 = 7.2 alpha, .
1.8 beta 1.9 rc to finally have 7.2.0 release that ease packaging, doesn't
need tricks.
But that's just a gratis 2cts feedback ;-)


--

Bruno Friedmann
 Ioda-Net Sàrl www.ioda-net.ch
 Bareos Partner, openSUSE Member, fsfe fellowship
 GPG KEY : D5C9B751C4653227
 irc: tigerfoot




_______________________________________________
mapserver-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-dev