Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build System: Convert Python scripts to python3 #138

Merged
merged 2 commits into from
Mar 24, 2023
Merged

Build System: Convert Python scripts to python3 #138

merged 2 commits into from
Mar 24, 2023

Conversation

jbglaw
Copy link
Contributor

@jbglaw jbglaw commented Sep 27, 2022

Change Makefile to invoke the Python scripts using the python3 interpreter, as well as using the 2to3 suggested changes to the scripts. Please note that the s/long/int/ change is not taken, as the python3-git module has a "long" option (for a git describe binding) which is obviously not an integer type but requests the long listing format...

Change `Makefile` to invoke the Python scripts using the `python3` interpreter,
as well as using the `2to3` suggested changes to the scripts. Please note that
the s/long/int/ change is not taken, as the python3-git module has a "long" option
(for a `git describe` binding) which is obviously not an integer type but requests
the long listing format...
@Baldanos
Copy link
Collaborator

These scripts work on python2 and python3.
Dropping support for python2 should not be a problem, as long as it doesn't break the build process on Windows.

The changes on the print statements are useless though.

I'll do some build tests on Windows. In the meantime, can you update the PR so the useless parenthesis are removed from the changes ?

@bvernoux
Copy link
Member

I have nothing to add same remark as @Baldanos
I could test on Windows when the changes will be done (remove useless parenthesis which are not required)

@bvernoux
Copy link
Member

bvernoux commented Sep 27, 2022

For information replacing python by python3 does not work on Windows with Python3.9 or more as the executable is python.exe and there is no any alias to python3 by default (so it is not found)
So we shall check (or cancel that modification) to be sure it is compatible with Windows Python3 from https://www.python.org/downloads/windows/

  • The only things which can be done is changing #!/usr/bin/env python2 by #!/usr/bin/env python3 in different python scripts

@jbglaw
Copy link
Contributor Author

jbglaw commented Sep 27, 2022

For information replacing python by python3 does not work on Windows with Python3.9 or more as the executable is python.exe and there is no any alias to python3 by default (so it is not found) So we shall check (or cancel that modification) to be sure it is compatible with Windows Python3 from https://www.python.org/downloads/windows/

  • The only things which can be done is changing #!/usr/bin/env python2 by #!/usr/bin/env python3 in different python scripts

That doesn't really make a difference: This project calls the Python scripts explicitely with an interpreter from Makefile. So the shellbang isn't used at all. (Which is, actually, quite the correct thing to do!) So for practical purposes, Makefile could possibly check for python3 and use python as a fallback.

@jbglaw
Copy link
Contributor Author

jbglaw commented Sep 27, 2022

These scripts work on python2 and python3. Dropping support for python2 should not be a problem, as long as it doesn't break the build process on Windows.

The changes on the print statements are useless though.

I'll do some build tests on Windows. In the meantime, can you update the PR so the useless parenthesis are removed from the changes ?

Done.

@bvernoux bvernoux merged commit f2c4c1b into hydrabus:master Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants