sphinx-contrib / sphinxcontrib-versioning

Sphinx extension that allows building versioned docs for self-hosting.
https://sphinxcontrib-versioning.readthedocs.io/en/latest/
MIT License
125 stars 81 forks source link

Set the Tempdir location #64

Closed swalsberger closed 5 years ago

swalsberger commented 5 years ago

Hey there we have a little problem with the temp directory on windows 10

we use a docker container (base on win 10) cause we have some windows only python modules in use 😞

if we call the sphinx cmd, the git branches will be checked out under C:\Users\ContainerAdministrator\AppData\Local\Temp\tmptqij_z1usphinxcontrib_versioning\1f30ec999f942f8b3de8bc24c8d4b25b3642132e\

this is a really long path (136 / 255) and we cant build the docs, because the working dir (subdirs) fills the rest of the path length => FileNotFoundError

can you add an option flag to set the "dir" arg in the "tempfile.mkdtemp" to None then i can use the TMPDIR env var to set my own temdir location

swalsberger commented 5 years ago

Found a workaround by setting the "Long Path" in the Regestry

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1