Open bennyrowland opened 3 years ago
You could also achieve this by not specifying the "package" setting. Example: https://github.com/ansible/pylibssh/blob/4c3feeb/pyproject.toml#L74-L75. Does this work for you?
This does allow towncrier to run without error, but it also means that I can no longer get the package name as part of the output section title. I guess that I can live with that as an easy solution.
Would you consider supporting this paradigm, perhaps as a configurable option? I am happy to put together a PR if the proposal is acceptable.
I just realized that I never responded to this bit. I think a PR would be welcome. Do you foresee any substantial downsides in making this unconditional? If yes, we'd need a toggle. If no, there'd be no need for one.
My only ask is trying not to break the existing users of this extension, the most prominent ones being aiohttp
, ansible-pylibssh
, attrs
and pip
. The eventual PR would need to be tested against those projects. Consider this an acceptance test.
Hey @bennyrowland, could you look into the previously asked question? What's your opinion on the downsides/side effects?
I have a project which includes some C extensions, built in an isolated environment via PEP-517. This means that the source tree never has a compiled version of the C extensions in it, only the built wheel has those. This makes it impossible to import the package from the source root. When sphinxcontrib-towncrier runs "python -m towncrier" this automatically adds the current directory to the system path, resulting in a failure of towncrier to import the module. This can be fixed by telling Python to run the module isolated "python -Im towncrier ...". Would you consider supporting this paradigm, perhaps as a configurable option? I am happy to put together a PR if the proposal is acceptable. Thanks.