Server 20.04 verses 16.04: python-gnuplot

Doug Smythies dsmythies at telus.net
Tue Jan 21 00:34:06 UTC 2020


On 2020.01.20 11:00 Bryce Harrington wrote,
> On Mon, Jan 20, 2020 at 08:22:39AM -0800, Doug Smythies wrote:
>> On 2020.01.19 17:03 Bryce Harrington wrote:
>>> On Sun, Jan 19, 2020 at 04:24:13PM -0800, Doug Smythies wrote:
>> I have not followed the issues, but am of the understanding that
>> the transition from python 2 to 3 has not been easy.
>
> It's certainly kept us busy.

>> I also observe that somewhere along the way my new 20.04 server seems to
>> have managed to get some of python 2 installed:

It seems the kernel-package wants to pull in a bunch of python 2 stuff [1].

> Some info on where things are at during development:
>
> https://lists.ubuntu.com/archives/ubuntu-devel/2019-November/040842.html

Thanks.

> I gather around release they'll make some adjustments, so some of the
> changes to e.g. remove the python shbang are being done more to make
> problems more evident, and could change for the release.

>> As for the kernel script example, and its prerequisites header:
>> 
>>> Prerequisites:
>>>     Python version 2.7.x
>>>     gnuplot 5.0 or higher
>>>     gnuplot-py 1.8    
>> 
>> I'll change that to whatever is required moving forward and submit upstream.
>> It just has to be distro independent, obviously.
>
> The python3 shbang should be fine to most upstreams.  Where there might
> be some difference of opinion is whether to call it like:
>
> #!/usr/bin/env python3
> 
> or
>
> #!/usr/bin/python3
>
> The former is preferred for distro scripts.

Thanks for the information.

tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py is the only
kernel tree script I use (although I have a few of my own based on it).
Out of general interest I had a look at what other python scripts in
the mainline kernel tree do:

There are 149 python scripts in the source tree (at least files that end in .py).

10 use: #! /usr/bin/python

7 use: #!/usr/bin/env python

14 use: #!/usr/bin/env python3

7 use: #!/usr/bin/python3

1 uses: #!/usr/bin/env drgn

1 uses: #!/usr/bin/python2

109: do not include a shbang line, I guess leaving it to the user to specify. Interesting.

... Doug

[1]

doug at serv-ff:~$ sudo apt install kernel-package
...
The following additional packages will be installed:
  ...
    ... python2 python2-minimal python2.7 python2.7-minimal
0 upgraded, 373 newly installed, 0 to remove and 0 not upgraded.





More information about the ubuntu-server mailing list