-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Recommended way of generating docs with dynamic versioning? #115
Comments
Hi! Does this work?
|
This unfortunately does not revert the version substitution after the command ran (including the changed |
Hmm, what OS, Python version, and Poetry version are you using? It works for me on Windows 11, Python 3.10.7, and Poetry 1.2.2. I think I remember that issue happening on Linux, though, and I'm not sure if there's anything the plugin can do about it since it has to do with how Poetry invokes the other process.
|
This is on RedHat Enterprise Linux 7, Python 3.11.2 and poetry 1.4.1. It would be helpful if there was a debug mode where the plugin reported what it is doing. I solved my initial problem for now by getting |
Here's the part of Poetry that prevents the plugin from cleaning up on Linux specifically: This was originally identified in #6 when it used I'm not sure if it's a good idea, but the plugin might be able to monkey patch |
A bit late, but I've just raised this issue in the Poetry repo: python-poetry/poetry#8092 |
I am using
sphinx-build
to generate my documentation, and itsconf.py
contains a__version__
variable and is set up to be substituted bypoetry-dynamic-versioning
.Unfortunately,
poetry run
is one of the few commands where dynamic versioning is not applied, so I cannot just callpoetry run sphinx-build <args>
.Is there a recommended way of running such commands?
I can only think of doing something like
git stash save && poetry dynamic-versioning && sphinx-build <args> && git restore . && git stash pop
right now (which I noticed does not work correctly when there is nothing to stash; it pops some old stashed code then).The text was updated successfully, but these errors were encountered: