-
Notifications
You must be signed in to change notification settings - Fork 74
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
Migrate python scripts to Python3 #124
base: master
Are you sure you want to change the base?
Conversation
All seems to work with python3.8 on Ubuntu 20.04.
Will this still compile on systems that don't have python3? If not, is there any sane way to support both recent python2 and also python3? What about this part of the patch?
I had an attempt to do this in the wip/ patch I committed a few days ago, but of course, not sure it is correct. |
No, it won't. Python3 is not backward compatible, so in this form, it is impossible to support Python2. As Python2 is deprecated in 2020, I assumed that any supported system has the capability to run Python3. Probably, keeping 2 versions of scripts in the same file tree wouldn't work as SCons relies on file names and there is no way to support both versions in single file. Another option is to keep different branch with Python2 as Python interpreter for scripts and maintain it until support for it will be abandoned eventually. |
I think we should have two branches then, one can be python-3, and the other python2. I still do compiles on old systems (back to Fedora-14 or so), so I will need to support python2 for a while I think. |
… classes. In effect pass configuration on scons 4.8.0
Some scripts are left with python2 shebang. There weren't used in build.
After this changes, I was able to fully build xorp targets on Ubuntu 20.04 with python3.8 and gcc9. Visible problem: libxorp_comm hasn't got correct path, so ldd cannot find it for xorp_rtrtmgr binary.
It seems to be near minimum to get the build working.