Hello, in 99,9% cases is scrdir, a directory of conf.py. Conf.py is executed, so you can use builtin __file__ variable:
import os print(__file__) # /home/matt/foo/conf.py print(os.path.dirname(__file__)) # /home/matt/foo If you really want to know srcdir value, you need to "hook" into Sphinx using setup() function inside conf.py: def setup(app): print(app.srcdir) # /home/matt/foo Matt https://blog.documatt.com On Fri, Aug 28, 2020 at 8:38 AM Nicolas Dechesne < nicolas.deche...@linaro.org> wrote: > hey, > > I would like to read the value of srcdir from inside conf.py. My > documentation folder is organized such that I need to set the version tag > based on the srcdir. > > is that possible? > > thanks! > > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sphinx-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/60d57327-ceb7-47ed-a6ec-4bf3803f73e4n%40googlegroups.com > <https://groups.google.com/d/msgid/sphinx-users/60d57327-ceb7-47ed-a6ec-4bf3803f73e4n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAOGNDW8oQptD%3D8V6ddutsY8vjgKA%3D8sOoEo%2BUK2oCN9_et0HzA%40mail.gmail.com.