← Back to team overview

kicad-developers team mailing list archive

Re: Python files still depending on Python2 only due used shebang

 

I'm guessing that fixing the shebangs will not be enough because there
is python2 specific code in the script files.

On 10/26/19 9:42 AM, Steven A. Falco wrote:
> This will become an issue for Fedora as well.  The command "python" used to mean "python2", but as of Fedora 31 (due to be released this Tuesday, 2019-10-29) the command "python" will mean "python3".
> 
> 	Steve
> 
> On 10/25/19 4:35 PM, Carsten Schoenert wrote:
>> Hi,
>>
>> as probably known Debian is planning to get Python2 removed within the
>> next planned stable release.
>>
>> This requires no hard dependencies on Python2 of course in all related
>> packages.
>>
>> The master branch (and of course also the branch 5.1) has still some
>> Python scripts which do have a shebang that is hard wired to the python2
>> binaries.
>>
>>> $ for file in `find -type f -name "*.py"`; do if head -1 $file | grep -e python2 -e /python; then echo found in $file; fi ;done
>>> #!/usr/bin/env python2.7
>>> found in ./pcbnew/python/examples/createFPC40.py
>>> #!/usr/bin/env python2
>>> found in ./scripts/ddr3_length_match.py
>>> #!/usr/bin/python
>>> found in ./scripts/test_plugin.py
>>> #!/usr/bin/python
>>> found in ./scripts/lib_convert.py
>>> #!/usr/bin/python
>>> found in ./scripts/test_kicad_plugin.py
>>
>> Any plans to convert these files to at least a shebang of
>> '#!/usr/bin/env python' and a compatibility so the scripts can also be
>> used within a Python3 interpreter?
>>
>> KiCad still has some other (indirect) dependencies on Python2 which will
>> also needed to get resolved, but that's another story.
>>
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


Follow ups

References