[PATCH] D37838: [lit] Allow lit config files to have a .py extension

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 17:39:57 PDT 2017


zturner added a comment.

In https://reviews.llvm.org/D37838#870368, @rnk wrote:

> `lit.cfg.py` still isn't a valid name for a python module. I had this idea that in the future we'd import the config module directly to simplify custom test formats defined in lit configuration files, which interact badly with multiprocessing.Pool. I guess that won't work well anyway since all the config files will have the same name, so we still have to move custom test formats out into well-named python modules.


Could we work around this by using `__import__` or something or searching for a module loader with a given path, and just assigning a dynamically generated name to the module?  Not trying to do anything like that with this patch by the way.

If it makes things simpler, I could call it `lit_cfg.py`?


https://reviews.llvm.org/D37838





More information about the llvm-commits mailing list