On 9/2/20 12:47 PM, Gary E. Miller via devel wrote: > Yo Eric! > > On Wed, 2 Sep 2020 08:07:53 -0400 (EDT) > "Eric S. Raymond via devel" <devel@ntpsec.org> wrote: > >> Retaining support for Python 2 proliferates test paths and >> complicates the fix for at least one outstanding bug. > > Python 2 will be with us for years more. Any time gpsd changes > in a way that breaks Python 2 it is reported in a day. > >> Proposed: We should drop support for Python 2 and use a python3 >> shebang in all our scripts.
Yes, please. > And which "python3 shebang" would you suggest? Last gpsd release > uncovered that still no distros agree on that. gpsd gave up and made the > python shebang a build option. I think it was "supposed" to be /usr/bin/python3. But things have changed a bit and /usr/bin/python may or may not be Python 3. (Then there's the usual shebang questions about the directory.) The most likely to work is probably this: #!/usr/bin/env python3 But yeah, I would make it a build option. waf presumably knows where Python is, since it is running in Python. I would use this for waf: #!/usr/bin/env python3 instead of its current: #!/usr/bin/env python That should give you the best chance of waf working out of the box. And if it doesn't, then the user only needs to special case the waf invocation(s), but the built NTPsec will have the right shebang for their distro. -- Richard
signature.asc
Description: OpenPGP digital signature
_______________________________________________ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel