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
ck2yaml and cti2yaml require Python 3, breaking builds that use system Python 2 #669
Comments
Python 2 EOL is January 1st, 2020. What is cantera's perspective for Python 2 support beyond this date? |
For the Python interface, 2.4.x will be the last release to support Python 2. We are attempting to keep the build script Python 2 compatible for the foreseeable future, so that, e.g., |
@bryanwweber ... thanks for the clarification. From a user perspective, being forced to consistently use Python 3 may have some advantages: a meaningful error message would avoid quite a bit of confusion (e.g. user forum questions). From what I can gather, a recent scons version is all that is required? |
I'm not sure what you're asking... Basically, since the default system Python is likely to be Python 2 on many of the platforms we support, and we want SCons to be able to use that Python, we are trying to keep the build process Python 2 compatible. However, the *2yaml scripts require Python 3 as noted here. Thus, if the YAML files are checked into the repository, the conversion won't be necessary and we can maintain Python 2 compatibility. |
The question was probably rhetorical. It boils down to eliminating a choice of
which instead should simply enforce a Python 3 interpreter. This would cut down on the periodic question/confusion on the user forum, and would presumably make maintenance easier (this issue is a case in point). Imho there isn't much of a point in prolonging the scheduled obsolescence of Python 2 more than necessary ... of course those are just my 2 cents. |
OK, I see what you're saying. I don't remember whether or not the check for Regardless, I don't think it makes sense for users to have to install Python 3 on their systems, since we want to support building just the C/C++/Fortran/MATLAB interfaces with the system Python (i.e., mostly Python 2) running SCons. This means we can't rely on Python 3 being available to run the |
This should be resolved by #768 |
Cantera version
2.5.0a3
Operating System
Any
When building from source, either Python 2 or Python 3 should be able to be used to run SCons. The new
ck2yaml
andcti2yaml
scripts depend on Python 3 features. The build script relies on at leastck2yaml
to convert CHEMKIN input files to the YAML format, so builds that use Python 2 to run SCons and don't specify apython_cmd
that is a Python 3 executable result in errors. One of them is documented on the Google Group:Steps to reproduce
python_cmd
One possible solution to this is to check the YAML files into the repository rather than creating them during the build process. Another option is to make the scripts compatible with Python 2.
The text was updated successfully, but these errors were encountered: