dentproject / dentOS

dentOS SwitchDev based NOS
Other
200 stars 59 forks source link

Convert onlbuilder to python3 #191

Closed taraschornyiplv closed 1 year ago

taraschornyiplv commented 1 year ago

Convert onlbuilder from python2 to python3

Use env to locate python3

Signed-off-by: Taras Chornyi taras.chornyi@plvision.eu

KanjiMonster commented 1 year ago

Using this I get the following warning with python3(.10):

/home/ubuntu/dentOS/docker/tools/onlbuilder:177: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if len(ops.isolate) is 0:
KanjiMonster commented 1 year ago

At least after fixing the warning I could build dentOS on Ubuntu 22.04 with only python3 (and python-is-python3) successfully.

I didn't test without the fix for the warning (or with python2).

KanjiMonster commented 1 year ago

While I don't object against using env for looking up python3, I think it should be a separate commit than the warning fix, as they are unrelated changes. This also currently leads to a disconnect between the commit subject and the commit message, which are talking about two different things.

taraschornyiplv commented 1 year ago

I'll split it to a separate commit

KanjiMonster commented 1 year ago

Can you please update the branch?

KanjiMonster commented 1 year ago

Merging is blocked The base branch requires all commits to be signed.

https://github.com/dentproject/dentOS/pull/191/commits/c569901af413ce3c2c9a10aa45058152d9214634 isn't signed.