Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Support running towncrier in isolated mode #53

Open
bennyrowland opened this issue Jul 12, 2021 · 4 comments
Open

[FR] Support running towncrier in isolated mode #53

bennyrowland opened this issue Jul 12, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@bennyrowland
Copy link

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.

@webknjaz webknjaz added the enhancement New feature or request label Jul 13, 2021
@webknjaz
Copy link
Member

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?

@bennyrowland
Copy link
Author

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.

@webknjaz
Copy link
Member

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.

@webknjaz
Copy link
Member

Hey @bennyrowland, could you look into the previously asked question? What's your opinion on the downsides/side effects?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants