dev-cafe / autocmake

CMake plugin composer.
http://autocmake.org
BSD 3-Clause "New" or "Revised" License
41 stars 18 forks source link

extract.py: AttributeError: 'str' object has no attribute 'items' #186

Closed miroi closed 7 years ago

miroi commented 7 years ago

Hi Rado,

when trying to update autocmake for mathlibs-tester I got this Python error in /cmake/autocmake/extract.py

milias@lxir074.gsi.de:~/Work/qch/software/small_projects/mathlibs-tester/cmake/.python -V
Python 2.7.3
milias@lxir074.gsi.de:~/Work/qch/software/small_projects/mathlibs-tester/cmake/.python update.py --self
- fetching autocmake/configure.py
- fetching autocmake/__init__.py
- fetching autocmake/external/docopt.py
- fetching autocmake/external/__init__.py
- fetching autocmake/generate.py
- fetching autocmake/extract.py
- fetching autocmake/interpolate.py
- fetching autocmake/parse_rst.py
- fetching autocmake/parse_yaml.py
- fetching update.py
milias@lxir074.gsi.de:~/Work/qch/software/small_projects/mathlibs-tester/cmake/.python update.py  ..
- parsing autocmake.yml
- assembling modules: [##############################] (15/15)Traceback (most recent call last):
  File "update.py", line 288, in <module>
    main(sys.argv)
  File "update.py", line 246, in main
    process_yaml(argv)
  File "update.py", line 163, in process_yaml
    modules, cleaned_config = fetch_modules(config, relative_path, download_directory)
  File "update.py", line 70, in fetch_modules
    d = to_d(v)
  File "/u/milias/Work/qch/software/small_projects/mathlibs-tester/cmake/autocmake/extract.py", line 23, in to_d
    for k, v in x.items():
AttributeError: 'str' object has no attribute 'items'
milias@lxir074.gsi.de:~/Work/qch/software/small_projects/mathlibs-tester/cmake/.
bast commented 7 years ago

Please provide me more details on how to reproduce the error. Where can I find the repo? Which branch? And so on. Thanks!

miroi commented 7 years ago

Ah, right. This is derived project. Seeking how to reproduce it in autocmake ...

bast commented 7 years ago

But where can I find it?

miroi commented 7 years ago

Hi,

it's this open project, https://github.com/miroi/mathlibs-tester/tree/update_autocmake

in which I wanted to upgrade autocmake.

bast commented 7 years ago

You are missing the source: keys for plugins and custom.

miroi commented 7 years ago

So my autocmake.yml is wrong ? Could you please specify what parts are incorrect ? https://github.com/miroi/mathlibs-tester/blob/update_autocmake/cmake/autocmake.yml

bast commented 7 years ago

You are missing a "source:" after https://github.com/miroi/mathlibs-tester/blob/update_autocmake/cmake/autocmake.yml#L37 and after https://github.com/miroi/mathlibs-tester/blob/update_autocmake/cmake/autocmake.yml#L47.

miroi commented 7 years ago

Works, thanks !

Closing this issue.