AbigailBuccaneer / json2cmake

Generate CMakeLists.txt from a compile_commands.json
MIT License
36 stars 15 forks source link

Python 3.7 --> TypeError: 'set' object does not support indexing #31

Closed mrsalo closed 6 years ago

mrsalo commented 6 years ago

I installed the latest version of json2cmake from Git in an Python 3.7 environment. When trying to run json2cmake I get the following error:

$ python --version
Python 3.7.0
$ json2cmake
Traceback (most recent call last):
  File "/home/salo/proggin/json2cmake/venv/bin/json2cmake", line 11, in <module>
    load_entry_point('json2cmake', 'console_scripts', 'json2cmake')()
  File "/home/salo/proggin/json2cmake/json2cmake/__init__.py", line 223, in main
    database.write(args.outfile, name=args.name)
  File "/home/salo/proggin/json2cmake/json2cmake/__init__.py", line 122, in write
    name = os.path.basename(os.path.commonprefix(files).rstrip("/_"))
  File "/home/salo/proggin/json2cmake/venv/lib/python3.7/genericpath.py", line 76, in commonprefix
    if not isinstance(m[0], (list, tuple)):
TypeError: 'set' object does not support indexing