ovasquez / mkdocs-merge

Merge the source of multiple MkDocs sites into a single one
https://ovasquez.github.io/mkdocs-merge/
MIT License
21 stars 5 forks source link

mkdocs-merge affected by setuptools moving to 70.2.0 #20

Open mzarucki opened 4 days ago

mzarucki commented 4 days ago

Hi @ovasquez,

Suddenly mkdocs-merge stopped working for us:

Cloning into 'ps-instructions'...
$ mkdocs-merge run . ps-instructions
Attempting to merge site: ps-instructions
Traceback (most recent call last):
  File "/usr/local/bin/mkdocs-merge", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/mkdocsmerge/__main__.py", line 44, in run
    merge.run_merge(master_site, sites, unify_sites, print_func=click.echo)
  File "/usr/local/lib/python3.9/site-packages/mkdocsmerge/merge.py", line 35, in run_merge
    new_navs = merge_sites(sites, master_docs_root, unify_sites, print_func)
  File "/usr/local/lib/python3.9/site-packages/mkdocsmerge/merge.py", line 105, in merge_sites
    dir_util.copy_tree(old_site_docs, new_site_docs, update=1)
  File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dir_util.py", line 146, in copy_tree
    mkpath(dst, verbose=verbose)
  File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dir_util.py", line 82, in mkpath
    _path_created.add(abs_head)
AttributeError: 'dict' object has no attribute 'add'

https://gitlab.cern.ch/cms-tsg/fog/documentation/-/jobs/40713402

Could you please help us understand the underlying issue?

Thanks a lot.

Cheers, Mateusz

mzarucki commented 4 days ago

The issue stems from the fact that setuptools moved from 70.1.1 to 70.2.0: https://github.com/pypa/setuptools/compare/v70.1.1...v70.2.0

ovasquez commented 3 days ago

@mzarucki thanks for catching this! I'll investigate if only the update is necessary and publish a new version.