cmake-python-distributions
cmake-python-distributions copied to clipboard
Porting old script to new version
Hello, I am trying to run this script: https://github.com/phodina/ProjectConverter/blob/master/converter.py But I am getting an error at cmakefile = cmake.CMake(project.getProject(), args.path) cmakefile.populateCMake() AttributeError: module 'cmake' has no attribute 'CMake'
Can you please write how to figure out how to fix this?
You can use something like:
from importlib.metadata import version
if version('cmake') < ...
...
We never provided a CMake class. This was trying to get a cmake.py file in your local project, which Python 2 would have done, while Python 3 requires you use a relative import, like from .cmake import CMake. Doesn't have anything to do with this package.
This file, specifically: https://github.com/phodina/ProjectConverter/blob/master/cmake.py
It looks like it's been untouched for years.