Skip to contentSkip to conversation

Building documentation offline?

DISCUSSION Florian Haas 2 participants 2 messages Jun 15, 2012

lore
Share & tools
lore
#0 lore raw

Hi everyone,

it occurred to me this afternoon that admin/build-doc unconditionally tries to fetch some updates from GitHub, which breaks building docs when you don't have a network connection. Would there be any reasonably simple way to make it support offline build, provided the various pip bits have previously been downloaded and installed?

Cheers,
Florian

#1 lore raw
Quoted 5 lines · Florian Haas

it occurred to me this afternoon that admin/build-doc unconditionally tries to fetch some updates from GitHub, which breaks building docs when you don't have a network connection. Would there be any reasonably simple way to make it support offline build, provided the various pip bits have previously been downloaded and installed?

Yeah pip's behavior there isn't quite ideal. I haven't found a way to make pip do the right thing when all the packages are already installed; I think that comes down to the fact that it

You can easily comment out the "pip install" line, for now.

The best I can find to make that really a no-op on an already-prepared virtualenv is to parse "$venv/bin/pip freeze" output and don't run it if I see the right things in there. I haven't added this, because I feel like that belongs in pip itself, running "pip install foo" twice just shouldn't need the network on the second run.