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

Porting old script to new version #504

Open
Kralg opened this issue Jun 11, 2024 · 3 comments
Open

Porting old script to new version #504

Kralg opened this issue Jun 11, 2024 · 3 comments

Comments

@Kralg
Copy link

Kralg commented Jun 11, 2024

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?

@LecrisUT
Copy link

You can use something like:

from importlib.metadata import version
if version('cmake') < ...
  ...

@henryiii
Copy link
Contributor

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.

@henryiii
Copy link
Contributor

This file, specifically: https://github.com/phodina/ProjectConverter/blob/master/cmake.py

It looks like it's been untouched for years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants