#1748 cli: switch shebang to python3
Opened 5 years ago by ktdreyer. Modified 3 years ago
ktdreyer/koji py3-cli  into  master

file modified
+1 -1
@@ -1,4 +1,4 @@ 

- #!/usr/bin/python2

+ #!/usr/bin/python3

  # coding=utf-8

  

  # command line interface for the Koji build system

When users run the koji client directly from a Git clone (outside of any packaging), they should use Python 3.

I have to make this python2 -> python3 change locally when I run the Koji client from a Git clone inside Travis CI. The latest Ubuntu versions in Travis CI only have Python 3 installed by default.

spec file sed replacements will stop to work in such case. On the other hand, we can go other way - have py3 as a default and fix spec/Makefiles accordingly.

I see what you mean. I read the .spec file closely and now I see there is a lot there. I will bring this up on the mailing list because I think it needs more discussion.

pretty please pagure-ci rebuild

5 years ago

I think Koji is Python 3-only now, right?

Also, https://fedoraproject.org/wiki/Changes/Python_means_Python3 is in Fedora 31, so /usr/bin/python is py3 now.

Can we use /usr/bin/python everywhere?

It would mean requiring python-unversioned-command for cli?

Using /usr/bin/python3 is safer no matter what.

Yeah, I'm trying to remember what we decided - is Koji Python 3 only now?

No, cli/lib/builder is still 2.7/3.6 (https://docs.pagure.org/koji/supported_platforms/)

But all of Koji can be built with Python 3.6 on RHEL 7...?