remove support for sphinx (#68601)

This commit is contained in:
Frédéric Péters 2022-09-01 08:47:21 +02:00
parent f03f1c1fbd
commit a81d75b539
1 changed files with 1 additions and 18 deletions

View File

@ -96,30 +96,13 @@ def publish_mallard(module, branch, directory):
json.dump(pages, open(os.path.join(output_dir, 'pages.json'), 'w'), indent=2)
def publish_sphinx(module):
checkout_dir = os.path.join(checkouts_directory, module.get('name'))
output_dir = os.path.join(web_directory, module.get('name'))
build_dir = os.path.join(checkout_dir, '_build/html')
os.system('rm -rf %s' % build_dir)
cmd = 'sphinx-build -b html -d _build/doctrees . _build/html'
os.system('cd %s && %s >/dev/null 2>&1' % (checkout_dir, cmd))
if os.path.isdir(output_dir):
shutil.rmtree(output_dir)
shutil.copytree(build_dir, output_dir)
with open('modules.json') as fd:
modules = json.load(fd)
for module in modules:
if module.get('type') == 'tarball':
if module.get('type') in ('sphinx', 'tarball'):
continue
checkout(module.get('name'))
if module.get('type') == "sphinx":
publish_sphinx(module)
continue
module['branch'] = 'dev'
publish_mallard(module, 'main', 'dev')