Migrated to Python3

This commit is contained in:
Alex Kirhenshtein 2018-12-28 15:49:00 +02:00
parent 41fb531743
commit 50c9de286d
8 changed files with 22 additions and 22 deletions

View file

@ -13,7 +13,7 @@ Sphinx/docutils extension to create links to Wikipedia articles.
'''
import re
import urllib
import urllib.request, urllib.parse, urllib.error
from docutils import nodes, utils
from sphinx.util.nodes import split_explicit_title
@ -31,7 +31,7 @@ def make_wikipedia_link(name, rawtext, text, lineno, inliner,
lang, target = m.groups()
if not has_explicit:
title = target
ref = base_url % lang + urllib.quote(target.replace(' ', '_').encode('utf8'), safe='')
ref = base_url % lang + urllib.parse.quote(target.replace(' ', '_').encode('utf8'), safe='')
node = nodes.reference(rawtext, title, refuri=ref, **options)
return [node],[]

View file

@ -1,14 +1,14 @@
# -*- coding: utf-8 -*-
exec(open("../conf.py").read())
# -- General -------------------------------------------------------------------
project = u'Administrator Guide'
project = 'Administrator Guide'
# -- Options for HTML output ---------------------------------------------------
html_title = "NetXMS %s %s" % (release, project)
# -- Options for LaTeX output --------------------------------------------------
latex_documents = [
('index', 'netxms-admin.tex', u'NetXMS %s' % project, project_author, 'manual'),
('index', 'netxms-admin.tex', 'NetXMS %s' % project, project_author, 'manual'),
]
# -- Options for Epub output ----------------------------------------------

View file

@ -7,7 +7,7 @@ import glob
from os.path import basename
# -- General configuration ------------------------------------------------
print(os.path.abspath('../_lib'))
print((os.path.abspath('../_lib')))
sys.path.insert(0, os.path.abspath('../_lib'))
extensions = [
@ -113,7 +113,7 @@ def setup(app):
app.connect('doctree-resolved', add_man_header_nodes)
# ignore custom modules except listed in $MODULES
modules = os.environ['MODULES'].split(',') if os.environ.has_key('MODULES') else []
modules = os.environ['MODULES'].split(',') if 'MODULES' in os.environ else []
extDirs = glob.glob('source/extensions/*')
for module in modules:
extDirs = [d for d in extDirs if module.strip() not in d]

View file

@ -1,14 +1,14 @@
# -*- coding: utf-8 -*-
exec(open("../conf.py").read())
# -- General -------------------------------------------------------------------
project = u'Developer Guide'
project = 'Developer Guide'
# -- Options for HTML output ---------------------------------------------------
html_title = "NetXMS %s %s" % (release, project)
# -- Options for LaTeX output --------------------------------------------------
latex_documents = [
('index', 'netxms-developer.tex', u'NetXMS %s' % project, project_author, 'manual'),
('index', 'netxms-developer.tex', 'NetXMS %s' % project, project_author, 'manual'),
]
# -- Options for Epub output ----------------------------------------------

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
exec(open("../conf.py").read())
# -- General -------------------------------------------------------------------
project = u'man pages'
project = 'man pages'
exclude_patterns = [
'man/template.rst',
@ -10,18 +10,18 @@ exclude_patterns = [
# -- Options for manual page output --------------------------------------------
# (source start file, name, description, authors, manual section).
authors = [
[u'Alex Kirhenshtein <alk@netxms.org>'],
['Alex Kirhenshtein <alk@netxms.org>'],
]
man_pages = [
# man5
('man/5/netxmsd-conf', 'netxmsd.conf',
u'configuration file for NetXMS daemon', authors[0], 5),
'configuration file for NetXMS daemon', authors[0], 5),
('man/5/nxagentd-conf', 'nxagentd.conf',
u'configuration file for NetXMS agent', authors[0], 5),
'configuration file for NetXMS agent', authors[0], 5),
# man8
('man/8/netxmsd', 'netxmsd', u'NetXMS daemon', authors[0], 8),
('man/8/nxdbmgr', 'nxdbmgr', u'NetXMS database manager', authors[0], 8),
('man/8/netxmsd', 'netxmsd', 'NetXMS daemon', authors[0], 8),
('man/8/nxdbmgr', 'nxdbmgr', 'NetXMS database manager', authors[0], 8),
]
# If true, show URL addresses after external links.

View file

@ -1,4 +1,4 @@
Sphinx==1.7.2
Sphinx==1.8.3
sphinx-autobuild==0.7.1
sphinx-intl==0.9.11
sphinx-rtd-theme==0.3.0
sphinx-rtd-theme==0.4.2

View file

@ -8,9 +8,9 @@ import shlex
source_suffix = '.rst'
master_doc = 'index'
project = u'NetXMS'
copyright = u'2015, SIA Raden Solutions'
author = u'SIA Raden Solutions'
project = 'NetXMS'
copyright = '2015, SIA Raden Solutions'
author = 'SIA Raden Solutions'
version = '1.0'
release = '1.0'

View file

@ -1,14 +1,14 @@
# -*- coding: utf-8 -*-
execfile('../conf.py')
exec(compile(open('../conf.py').read(), '../conf.py', 'exec'))
# -- General -------------------------------------------------------------------
project = u'User Manual'
project = 'User Manual'
# -- Options for HTML output ---------------------------------------------------
html_title = "NetXMS %s %s" % (release, project)
# -- Options for LaTeX output --------------------------------------------------
latex_documents = [
('index', 'netxms-user.tex', u'NetXMS %s' % project, project_author, 'manual'),
('index', 'netxms-user.tex', 'NetXMS %s' % project, project_author, 'manual'),
]
# -- Options for Epub output ----------------------------------------------