简体   繁体   English

使用doxygen构建python文档时如何处理名称冲突

[英]How do I deal with conflicting names when building python docs with doxygen

I'm having a problem with Doxygen for Windows with Python where input files with the same failename cause a conflict wth the output files. 我在使用Python的Windows的Doxygen遇到问题,其中具有相同failename的输入文件会导致输出文件发生冲突。 This seems to be a bug in doxygen - is there a way to work-around this problem? 这似乎是doxygen中的错误-有办法解决此问题吗?


Background 背景

We build docs for our API using Doxygen. 我们使用Doxygen为我们的API构建文档。 Our project is overwhelmingly written in python and the only components that our clients care about are python. 我们的项目绝大多数是用python编写的,我们客户唯一关心的组件是python。 Due to accidents of history our classes often have unfortunate naming conventions. 由于历史的偶然性,我们的班级经常使用不幸的命名约定。

For example we have a classes whose fully-qualified name are: 例如,我们有一个类的完全限定名称是:

tools.b.foo.Foo
tools.b.bar.Bar

Later this class was re-implemented and put into a new module: 稍后,该类被重新实现,并放入一个新模块中:

tools.c.foo.Foo_improved
tools.c.bar.Bar_improved

When we want to build our tools API documentation we have a process which checks out tools.* into a directory on the build-server and then we call doxygen with a fairly standard configuration file. 当我们要构建工具API文档时,我们有一个过程可以将tools。*检出到构建服务器上的目录中,然后使用相当标准的配置文件调用doxygen。

We'd expect that there should be four HTML files in the output, two for foo and two for bar. 我们希望输出中应该有四个HTML文件,两个用于foo,两个用于bar。 However what we get is only two files. 但是,我们得到的只有两个文件。 Both sets of sripts are parsed, however since the module names are the same the documentation for the old version ends up over-writing the documentation which was generated for the new versions. 两组摘要都被解析,但是由于模块名称相同,因此旧版本的文档最终会覆盖为新版本生成的文档。 As a result in every case where a python module name is duplicated (but in a different sub-package) we are only getting a single doc file for every file name. 结果,在每种情况下都重复了python模块名称(但在不同的子包中),因此每个文件名只会得到一个doc文件。

FYI, we are using doxygen 1.7.1 on Windows XP 32bit with Python 2.4.4 仅供参考,我们在Windows XP 32位和Python 2.4.4上使用doxygen 1.7.1

Config file is here: http://pastebin.me/002f3ec3145f4e1896a9cf79e7179493 配置文件在这里: http : //pastebin.me/002f3ec3145f4e1896a9cf79e7179493

UPDATE 1: In the generated doc index I can see entries for all four files, however if I follow the links to both Foo and Foo_improved both point to the same file. 更新1:在生成的文档索引中,我可以看到所有四个文件的条目,但是,如果我遵循指向Foo和Foo_improved的链接,则它们都指向同一文件。

您可以尝试显式声明带有完整名称空间的类http://www.doxygen.nl/manual/commands.html#cmdclass

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从boost :: python docstrings创建doxygen文档? - How can I create doxygen docs from boost::python docstrings? 在python中,您如何处理域名中的其他编码 - In python how do you deal with other encodings in domain names 我该如何处理? 试图获得结果以产生主机变量的名称 - How do i deal with this? trying to get the outcome to produce the names of the hostvars 如何处理名称冲突的python包? - How to handle python packages with conflicting names? 如何在Python中处理逻辑表达式? - How do I deal with a logical expression in Python? 如何在构建python扩展时指定链接器? - How do I specify the linker when building python extensions? 如何处理与公共名称冲突的专有 Python package 名称? - How to deal with a proprietary Python package name conflicting with a public one? Python和冲突的模块名称 - Python and conflicting module names 如何处理我的antlr语法和目标语言之间冲突的函数名称 - how do I handle conflicting function names between my antlr grammar and target language 如何在来自 Python 文档字符串的 Sphinx 文档中显示图像? - How do I display an image in Sphinx docs from a Python docstring?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM