-
Notifications
You must be signed in to change notification settings - Fork 46
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
Circular logic in build_requirements.py and custom_conf.py #197
Comments
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Changing the build job to `pre_install` for the `build_requirements.py` script means that the build machine will already be fully set up, so that you can use pip to install any packages that are required in `custom_conf.py` and will otherwise give errors. This is required to work around canonical#197. Signed-off-by: Ruth Fuchss <[email protected]>
Sorry for the noise here. 😉 This is only a workaround though and doesn't fix the underlying problem. Any idea on how to fix this, @dviererbe ? |
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]>
Manually install gitpython, because it must be available to generate the requirements.txt file, which is before the venv is created. Issue for this is here: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Ruth Fuchss <[email protected]> (cherry picked from commit 5db8be4)
note: If I understand the Ubuntu Pro case correctly, the reason why they need the module in suggestion: Therefore the solution to this problem should be to provide hooks that can be customized by downstreams. thought: Still, this outlines another potential problem. What if they would have actually "configured" something in suggestion: I have some Ideas how to solve that:
question: @ru-fu What do you think? |
Only source SPHINXENV file once and consistently use pip while working around canonical/sphinx-docs-starter-pack#197 Signed-off-by: Simon Deziel <[email protected]>
Consistently use pip and link to the upstream bug: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Simon Deziel <[email protected]>
And link to the upstream bug: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Simon Deziel <[email protected]>
And link to the upstream bug: canonical/sphinx-docs-starter-pack#197 Signed-off-by: Simon Deziel <[email protected]> (cherry picked from commit 1d3b87f)
First of all, I don't have a clear picture yet of how this dependency management will fit into the ongoing work of turning the starter pack into an extension. It might be that the problem automatically goes away then - but if it doesn't, we should probably figure out a solution that works in both scenarios. That aside:
One idea I had (and which is funnily quite similar to your solution 2, but doesn't seem as confusing to me 😆 ) is to have some way to exclude parts of the |
See canonical#197 If projects include additional Python packages in custom_conf.py, those must be installed before running the build_requirements.py script. This change makes it possible to just specify such packages in the ADDPREREQS variable. Signed-off-by: Ruth Fuchss <[email protected]>
See canonical#197 If projects include additional Python packages in custom_conf.py, those must be installed before running the build_requirements.py script. This change makes it possible to just specify such packages in the ADDPREREQS variable. Signed-off-by: Ruth Fuchss <[email protected]>
Addresses canonical#197 Signed-off-by: Ruth Fuchss <[email protected]>
I needed to add a custom module (gitpython) to the build requirements for use in a custom scriptlet I added in custom_conf.py. I added the module to the custom_conf.py file as suggested in the starter pack instructions. When I built locally (where I have gitpython installed), everything worked correctly and the requirements.txt file showed the module as expected.
However, it seems that we're running build_requirements.py to generate the requirements file, but the script is also importing the custom_conf.py file which already NEEDS the requirement, which makes the logic somewhat circular. When I later submitted a PR including this custom module + scriptlet, the build couldn't complete as the gitpython module was never installed.
We have implemented a workaround by using a separate script file containing my scriptlet, which I then call from conf.py after build_requirements.py and custom_conf.py, but this is not ideal in the long term since if we intend people to keep automatically up-to-date with the starter pack the conf.py file will eventually get overwritten.
The text was updated successfully, but these errors were encountered: