Migrate code style to Black
This commit is contained in:
parent
6cb4380d01
commit
41720c5a7e
|
@ -26,4 +26,5 @@ able to run gramps from the source directory without setting PYTHONPATH
|
|||
From this position, import gramps works great
|
||||
"""
|
||||
import gramps.grampsapp as app
|
||||
|
||||
app.main()
|
||||
|
|
|
@ -5,36 +5,40 @@ from os.path import join
|
|||
import sys
|
||||
import site
|
||||
|
||||
if getattr(sys, 'frozen', False):
|
||||
if getattr(sys, "frozen", False):
|
||||
aio = os.path.dirname(sys.executable)
|
||||
sys.path.insert(1, aio)
|
||||
sys.path.insert(1, os.path.join(aio,'lib'))
|
||||
sys.path.insert(1, os.path.join(aio, "lib"))
|
||||
sys.path.insert(1, site.getusersitepackages())
|
||||
environ['PANGOCAIRO_BACKEND'] = 'fontconfig'
|
||||
environ['SSL_CERT_FILE'] = join(aio, 'ssl/certs/ca-bundle.trust.crt')
|
||||
environ['GI_TYPELIB_PATH'] = join(aio, 'lib/girepository-1.0')
|
||||
environ['G_ENABLE_DIAGNOSTIC'] = '0'
|
||||
environ['G_PARAM_DEPRECATED'] = '0'
|
||||
environ['GRAMPS_RESOURCES'] = join(aio, 'share')
|
||||
environ['PATH'] = aio + ';' + aio +'\lib;' + environ['PATH']
|
||||
environ["PANGOCAIRO_BACKEND"] = "fontconfig"
|
||||
environ["SSL_CERT_FILE"] = join(aio, "ssl/certs/ca-bundle.trust.crt")
|
||||
environ["GI_TYPELIB_PATH"] = join(aio, "lib/girepository-1.0")
|
||||
environ["G_ENABLE_DIAGNOSTIC"] = "0"
|
||||
environ["G_PARAM_DEPRECATED"] = "0"
|
||||
environ["GRAMPS_RESOURCES"] = join(aio, "share")
|
||||
environ["PATH"] = aio + ";" + aio + "\lib;" + environ["PATH"]
|
||||
|
||||
|
||||
def close():
|
||||
sys.exit()
|
||||
|
||||
|
||||
import atexit
|
||||
import ctypes
|
||||
|
||||
HANDLE = ctypes.windll.kernel32.CreateMutexW(None, 1, "org.gramps-project.gramps")
|
||||
ERROR = ctypes.GetLastError()
|
||||
if ERROR == 183: #ERROR_ALREADY_EXISTS:
|
||||
print('Gramps is already running!', file=sys.stderr)
|
||||
if ERROR == 183: # ERROR_ALREADY_EXISTS:
|
||||
print("Gramps is already running!", file=sys.stderr)
|
||||
close()
|
||||
|
||||
atexit.register(ctypes.windll.kernel32.CloseHandle, HANDLE)
|
||||
atexit.register(ctypes.windll.kernel32.ReleaseMutex, HANDLE)
|
||||
|
||||
import warnings
|
||||
|
||||
warnings.simplefilter("ignore")
|
||||
|
||||
import gramps.grampsapp as app
|
||||
|
||||
app.run()
|
||||
|
|
|
@ -5,19 +5,20 @@ from os.path import join
|
|||
import sys
|
||||
import site
|
||||
|
||||
if getattr(sys, 'frozen', False):
|
||||
if getattr(sys, "frozen", False):
|
||||
aio = os.path.dirname(sys.executable)
|
||||
sys.path.insert(1, aio)
|
||||
sys.path.insert(1, os.path.join(aio,'lib'))
|
||||
sys.path.insert(1, os.path.join(aio, "lib"))
|
||||
sys.path.insert(1, site.getusersitepackages())
|
||||
environ['LANG'] = 'en'
|
||||
environ['PANGOCAIRO_BACKEND'] = 'fontconfig'
|
||||
environ['SSL_CERT_FILE'] = join(aio, 'ssl/certs/ca-bundle.trust.crt')
|
||||
environ['GI_TYPELIB_PATH'] = join(aio, 'lib/girepository-1.0')
|
||||
environ['G_ENABLE_DIAGNOSTIC'] = '0'
|
||||
environ['G_PARAM_DEPRECATED'] = '0'
|
||||
environ['GRAMPS_RESOURCES'] = join(aio, 'share')
|
||||
environ['PATH'] = aio + ';' + aio +'\lib;' + environ['PATH']
|
||||
environ["LANG"] = "en"
|
||||
environ["PANGOCAIRO_BACKEND"] = "fontconfig"
|
||||
environ["SSL_CERT_FILE"] = join(aio, "ssl/certs/ca-bundle.trust.crt")
|
||||
environ["GI_TYPELIB_PATH"] = join(aio, "lib/girepository-1.0")
|
||||
environ["G_ENABLE_DIAGNOSTIC"] = "0"
|
||||
environ["G_PARAM_DEPRECATED"] = "0"
|
||||
environ["GRAMPS_RESOURCES"] = join(aio, "share")
|
||||
environ["PATH"] = aio + ";" + aio + "\lib;" + environ["PATH"]
|
||||
|
||||
import gramps.grampsapp as app
|
||||
|
||||
app.run()
|
||||
|
|
|
@ -1,39 +1,42 @@
|
|||
#!/usr/bin/env python3
|
||||
'''
|
||||
"""
|
||||
grampsw.exe
|
||||
'''
|
||||
"""
|
||||
import os
|
||||
from os import environ
|
||||
from os.path import join
|
||||
import sys
|
||||
import site
|
||||
|
||||
if getattr(sys, 'frozen', False):
|
||||
if getattr(sys, "frozen", False):
|
||||
aio = os.path.dirname(sys.executable)
|
||||
sys.path.insert(1, aio)
|
||||
sys.path.insert(1, os.path.join(aio,'lib'))
|
||||
sys.path.insert(1, os.path.join(aio, "lib"))
|
||||
sys.path.insert(1, site.getusersitepackages())
|
||||
environ['SSL_CERT_FILE'] = join(aio, 'ssl/certs/ca-bundle.trust.crt')
|
||||
environ['GI_TYPELIB_PATH'] = join(aio, 'lib/girepository-1.0')
|
||||
environ['G_ENABLE_DIAGNOSTIC'] = '0'
|
||||
environ['G_PARAM_DEPRECATED'] = '0'
|
||||
environ['GRAMPS_RESOURCES'] = join(aio, 'share')
|
||||
environ['PATH'] = aio + ';' + aio +'\lib;' + environ['PATH']
|
||||
environ["SSL_CERT_FILE"] = join(aio, "ssl/certs/ca-bundle.trust.crt")
|
||||
environ["GI_TYPELIB_PATH"] = join(aio, "lib/girepository-1.0")
|
||||
environ["G_ENABLE_DIAGNOSTIC"] = "0"
|
||||
environ["G_PARAM_DEPRECATED"] = "0"
|
||||
environ["GRAMPS_RESOURCES"] = join(aio, "share")
|
||||
environ["PATH"] = aio + ";" + aio + "\lib;" + environ["PATH"]
|
||||
|
||||
import atexit
|
||||
import ctypes
|
||||
|
||||
|
||||
def close():
|
||||
''' Show warning dialog if Gramps is already running'''
|
||||
sys.exit('Gramps is already running!')
|
||||
"""Show warning dialog if Gramps is already running"""
|
||||
sys.exit("Gramps is already running!")
|
||||
|
||||
|
||||
HANDLE = ctypes.windll.kernel32.CreateMutexW(None, 1, "org.gramps-project.gramps")
|
||||
ERROR = ctypes.GetLastError()
|
||||
if ERROR == 183: #ERROR_ALREADY_EXISTS:
|
||||
if ERROR == 183: # ERROR_ALREADY_EXISTS:
|
||||
close()
|
||||
|
||||
atexit.register(ctypes.windll.kernel32.CloseHandle, HANDLE)
|
||||
atexit.register(ctypes.windll.kernel32.ReleaseMutex, HANDLE)
|
||||
|
||||
import gramps.grampsapp as app
|
||||
|
||||
app.main()
|
||||
|
|
340
aio/setup.py
340
aio/setup.py
|
@ -1,7 +1,7 @@
|
|||
'''
|
||||
"""
|
||||
Use with:
|
||||
python3 setup.py build_exe --no-compress -O1
|
||||
'''
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
import site
|
||||
|
@ -11,171 +11,273 @@ import atexit
|
|||
import shutil
|
||||
import zipfile
|
||||
import cx_Freeze
|
||||
sys.path.insert(0,'dist')
|
||||
|
||||
sys.path.insert(0, "dist")
|
||||
import gramps
|
||||
from gramps.version import VERSION_TUPLE
|
||||
|
||||
try:
|
||||
from gramps.version import VERSION_QUALIFIER
|
||||
except:
|
||||
VERSION_QUALIFIER = ''
|
||||
UPX_ALT_PATH = r'UPX'
|
||||
VERSION_QUALIFIER = ""
|
||||
UPX_ALT_PATH = r"UPX"
|
||||
|
||||
#import logging
|
||||
#logging.basicConfig(level=logging.DEBUG)
|
||||
VQ = {'-alpha1': 10, '-alpha2': 11, '-alpha3': 12,
|
||||
'-beta1': 21, '-beta2': 22, '-beta3': 23,
|
||||
'-rc1': 22, '': 0}
|
||||
# import logging
|
||||
# logging.basicConfig(level=logging.DEBUG)
|
||||
VQ = {
|
||||
"-alpha1": 10,
|
||||
"-alpha2": 11,
|
||||
"-alpha3": 12,
|
||||
"-beta1": 21,
|
||||
"-beta2": 22,
|
||||
"-beta3": 23,
|
||||
"-rc1": 22,
|
||||
"": 0,
|
||||
}
|
||||
|
||||
VERSION = ('.'.join(map(str, VERSION_TUPLE)) + '.' +
|
||||
str(VQ.get(VERSION_QUALIFIER, 99)))
|
||||
COPYRIGHT="Copyright 2020, Gramps developers. GNU General Public License"
|
||||
VERSION = ".".join(map(str, VERSION_TUPLE)) + "." + str(VQ.get(VERSION_QUALIFIER, 99))
|
||||
COPYRIGHT = "Copyright 2020, Gramps developers. GNU General Public License"
|
||||
# Prepare a temporay directory
|
||||
TEMP_DIR = tempfile.TemporaryDirectory()
|
||||
atexit.register(TEMP_DIR.cleanup)
|
||||
BASE_DIR = os.path.split(sys.prefix)[1]
|
||||
SETUP_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
SETUP_FILES = ['setup.py', 'gramps.ico', 'grampsc.ico', 'grampsd.ico',
|
||||
'grampsaioc.py', 'grampsaiocd.py', 'grampsaiow.py']
|
||||
if '32' in BASE_DIR:
|
||||
SETUP_FILES.append(''.join(('grampsaio', '32', '.nsi')))
|
||||
SETUP_FILES = [
|
||||
"setup.py",
|
||||
"gramps.ico",
|
||||
"grampsc.ico",
|
||||
"grampsd.ico",
|
||||
"grampsaioc.py",
|
||||
"grampsaiocd.py",
|
||||
"grampsaiow.py",
|
||||
]
|
||||
if "32" in BASE_DIR:
|
||||
SETUP_FILES.append("".join(("grampsaio", "32", ".nsi")))
|
||||
else:
|
||||
SETUP_FILES.append(''.join(('grampsaio', '64', '.nsi')))
|
||||
SETUP_FILES.append("".join(("grampsaio", "64", ".nsi")))
|
||||
|
||||
INCLUDE_DLL_PATH = os.path.join(sys.exec_prefix, 'bin')
|
||||
INCLUDE_DLL_PATH = os.path.join(sys.exec_prefix, "bin")
|
||||
INCLUDE_FILES = []
|
||||
INCLUDES = ['gi', 'cgi', 'colorsys', 'site']
|
||||
PACKAGES = ['gi', 'cairo', 'xml', 'bsddb3', 'lxml', 'PIL', 'json', 'csv',
|
||||
'sqlite3', 'cProfile', 'networkx', 'psycopg2', 'requests', 'logging'
|
||||
, 'html', 'compileall', 'graphviz', 'pydotplus', 'pygraphviz', 'pydot' ]
|
||||
EXCLUDES = ['tkinter', 'PyQt5', 'PyQt5.QtCore', 'PyQt5.QtGui', 'pyside'
|
||||
'PyQt5.QtWidgets', 'sip', 'lib2to3', 'PIL.ImageQt', 'pip', 'distlib'
|
||||
]
|
||||
INCLUDES = ["gi", "cgi", "colorsys", "site"]
|
||||
PACKAGES = [
|
||||
"gi",
|
||||
"cairo",
|
||||
"xml",
|
||||
"bsddb3",
|
||||
"lxml",
|
||||
"PIL",
|
||||
"json",
|
||||
"csv",
|
||||
"sqlite3",
|
||||
"cProfile",
|
||||
"networkx",
|
||||
"psycopg2",
|
||||
"requests",
|
||||
"logging",
|
||||
"html",
|
||||
"compileall",
|
||||
"graphviz",
|
||||
"pydotplus",
|
||||
"pygraphviz",
|
||||
"pydot",
|
||||
]
|
||||
EXCLUDES = [
|
||||
"tkinter",
|
||||
"PyQt5",
|
||||
"PyQt5.QtCore",
|
||||
"PyQt5.QtGui",
|
||||
"pyside" "PyQt5.QtWidgets",
|
||||
"sip",
|
||||
"lib2to3",
|
||||
"PIL.ImageQt",
|
||||
"pip",
|
||||
"distlib",
|
||||
]
|
||||
|
||||
REPLACE_PATHS = [('*', 'AIO/'),
|
||||
( site.getsitepackages()[0]
|
||||
+'cx_freeze-5.0-py3.6-mingw.egg/cx_Freeze', 'cx_Freeze/')
|
||||
]
|
||||
MISSING_DLL = ['libgtk-3-0.dll', 'libgtkspell3-3-0.dll', 'libgexiv2-2.dll',
|
||||
'libgoocanvas-3.0-9.dll', 'libosmgpsmap-1.0-1.dll',
|
||||
'gswin32c.exe', 'dot.exe', 'libgvplugin_core-6.dll',
|
||||
'libgvplugin_dot_layout-6.dll', 'libgvplugin_gd-6.dll',
|
||||
'libgvplugin_pango-6.dll', 'libgvplugin_rsvg-6.dll',
|
||||
'glib-compile-schemas.exe',
|
||||
'gdk-pixbuf-query-loaders.exe', 'gtk-update-icon-cache-3.0.exe',
|
||||
'fc-cache.exe', 'fc-match.exe', 'gspawn-win64-helper-console.exe',
|
||||
'gspawn-win64-helper.exe', 'libgeocode-glib-0.dll'
|
||||
]
|
||||
BIN_EXCLUDES = ['Qt5Core.dll', 'gdiplus.dll', 'gdiplus']
|
||||
REPLACE_PATHS = [
|
||||
("*", "AIO/"),
|
||||
(
|
||||
site.getsitepackages()[0] + "cx_freeze-5.0-py3.6-mingw.egg/cx_Freeze",
|
||||
"cx_Freeze/",
|
||||
),
|
||||
]
|
||||
MISSING_DLL = [
|
||||
"libgtk-3-0.dll",
|
||||
"libgtkspell3-3-0.dll",
|
||||
"libgexiv2-2.dll",
|
||||
"libgoocanvas-3.0-9.dll",
|
||||
"libosmgpsmap-1.0-1.dll",
|
||||
"gswin32c.exe",
|
||||
"dot.exe",
|
||||
"libgvplugin_core-6.dll",
|
||||
"libgvplugin_dot_layout-6.dll",
|
||||
"libgvplugin_gd-6.dll",
|
||||
"libgvplugin_pango-6.dll",
|
||||
"libgvplugin_rsvg-6.dll",
|
||||
"glib-compile-schemas.exe",
|
||||
"gdk-pixbuf-query-loaders.exe",
|
||||
"gtk-update-icon-cache-3.0.exe",
|
||||
"fc-cache.exe",
|
||||
"fc-match.exe",
|
||||
"gspawn-win64-helper-console.exe",
|
||||
"gspawn-win64-helper.exe",
|
||||
"libgeocode-glib-0.dll",
|
||||
]
|
||||
BIN_EXCLUDES = ["Qt5Core.dll", "gdiplus.dll", "gdiplus"]
|
||||
|
||||
from os.path import dirname, basename
|
||||
import lib2to3
|
||||
lib23_path = dirname(lib2to3.__file__)
|
||||
INCLUDE_FILES.append((lib23_path, 'lib/lib2to3'))
|
||||
import pip
|
||||
libpip_path = dirname(pip.__file__)
|
||||
INCLUDE_FILES.append((libpip_path,'lib/pip'))
|
||||
import distlib
|
||||
libdistlib_path = dirname(distlib.__file__)
|
||||
INCLUDE_FILES.append((libdistlib_path,'lib/distlib'))
|
||||
|
||||
os.makedirs(os.path.join(BASE_DIR, 'var/cache/fontconfig'), exist_ok=True)
|
||||
lib23_path = dirname(lib2to3.__file__)
|
||||
INCLUDE_FILES.append((lib23_path, "lib/lib2to3"))
|
||||
import pip
|
||||
|
||||
libpip_path = dirname(pip.__file__)
|
||||
INCLUDE_FILES.append((libpip_path, "lib/pip"))
|
||||
import distlib
|
||||
|
||||
libdistlib_path = dirname(distlib.__file__)
|
||||
INCLUDE_FILES.append((libdistlib_path, "lib/distlib"))
|
||||
|
||||
os.makedirs(os.path.join(BASE_DIR, "var/cache/fontconfig"), exist_ok=True)
|
||||
for file in SETUP_FILES:
|
||||
INCLUDE_FILES.append((os.path.join(SETUP_DIR, file),
|
||||
os.path.join('src', file)))
|
||||
INCLUDE_FILES.append((os.path.join(SETUP_DIR, file), os.path.join("src", file)))
|
||||
for dll in MISSING_DLL:
|
||||
INCLUDE_FILES.append((os.path.join(INCLUDE_DLL_PATH, dll),
|
||||
os.path.join('lib',dll)))
|
||||
MISSING_LIBS = ['lib/enchant-2', 'lib/gdk-pixbuf-2.0', 'lib/girepository-1.0',
|
||||
'share/enchant', 'share/glib-2.0/schemas',
|
||||
'share/xml/iso-codes', 'etc/gtk-3.0',
|
||||
'etc/ssl/certs', 'etc/ssl/cert.pem', 'etc/fonts', 'lib/gio',
|
||||
'share/icons/gnome',
|
||||
'share/icons/hicolor', 'share/icons/gramps.png',
|
||||
'share/icons/Adwaita/icon-theme.cache',
|
||||
'share/icons/Adwaita/index.theme', 'share/hunspell'
|
||||
]
|
||||
ADWAITA = ['8x8', '16x16', '22x22', '24x24', '32x32', '48x48', '64x64',
|
||||
'96x96', 'cursors'
|
||||
]
|
||||
INCLUDE_FILES.append(
|
||||
(os.path.join(INCLUDE_DLL_PATH, dll), os.path.join("lib", dll))
|
||||
)
|
||||
MISSING_LIBS = [
|
||||
"lib/enchant-2",
|
||||
"lib/gdk-pixbuf-2.0",
|
||||
"lib/girepository-1.0",
|
||||
"share/enchant",
|
||||
"share/glib-2.0/schemas",
|
||||
"share/xml/iso-codes",
|
||||
"etc/gtk-3.0",
|
||||
"etc/ssl/certs",
|
||||
"etc/ssl/cert.pem",
|
||||
"etc/fonts",
|
||||
"lib/gio",
|
||||
"share/icons/gnome",
|
||||
"share/icons/hicolor",
|
||||
"share/icons/gramps.png",
|
||||
"share/icons/Adwaita/icon-theme.cache",
|
||||
"share/icons/Adwaita/index.theme",
|
||||
"share/hunspell",
|
||||
]
|
||||
ADWAITA = [
|
||||
"8x8",
|
||||
"16x16",
|
||||
"22x22",
|
||||
"24x24",
|
||||
"32x32",
|
||||
"48x48",
|
||||
"64x64",
|
||||
"96x96",
|
||||
"cursors",
|
||||
]
|
||||
for adw in ADWAITA:
|
||||
INCLUDE_FILES.append((os.path.join(sys.prefix, 'share/icons/Adwaita', adw),
|
||||
os.path.join('share/icons/Adwaita', adw)))
|
||||
INCLUDE_FILES.append(
|
||||
(
|
||||
os.path.join(sys.prefix, "share/icons/Adwaita", adw),
|
||||
os.path.join("share/icons/Adwaita", adw),
|
||||
)
|
||||
)
|
||||
for lib in MISSING_LIBS:
|
||||
INCLUDE_FILES.append((os.path.join(sys.prefix, lib), lib))
|
||||
|
||||
INCLUDE_FILES.append('dist/gramps')
|
||||
INCLUDE_FILES.append(('dist/gramps-' + '.'.join(map(str, VERSION_TUPLE)) + '.data/data/share','share'))
|
||||
EXECUTABLES = [cx_Freeze.Executable("grampsaioc.py", base="Console",
|
||||
target_name='gramps.exe',
|
||||
icon='gramps.ico', copyright=COPYRIGHT),
|
||||
cx_Freeze.Executable("grampsaiow.py", base="Win32GUI",
|
||||
target_name='grampsw.exe',
|
||||
icon='gramps.ico', copyright=COPYRIGHT),
|
||||
cx_Freeze.Executable("grampsaiocd.py", base="Console",
|
||||
target_name='grampsd.exe',
|
||||
icon='grampsd.ico', copyright=COPYRIGHT)
|
||||
]
|
||||
BUILD_EXE_OPTIONS = {'packages':PACKAGES,
|
||||
'includes':INCLUDES,
|
||||
'excludes':EXCLUDES,
|
||||
'include_files':INCLUDE_FILES,
|
||||
'bin_includes':MISSING_DLL,
|
||||
'zip_include_packages': '*', #ZIP_INCLUDE_PACKAGES,
|
||||
'zip_exclude_packages':EXCLUDES,
|
||||
'bin_excludes':BIN_EXCLUDES,
|
||||
'replace_paths':REPLACE_PATHS,
|
||||
'build_exe':BASE_DIR,
|
||||
}
|
||||
BDIST_MSI_OPTIONS = { #uuid.uuid5(uuid.NAMESPACE_DNS, 'GrampsAIO64-5-trunk')
|
||||
'upgrade_code': '{fbccc04b-7b2e-56d3-8bb7-94d5f68de822}',
|
||||
#uuid.uuid5(uuid.NAMESPACE_DNS, 'v5.0.0-alpha1-476-g473d3aa')
|
||||
'product_code': '{48304362-2945-5a10-ad60-241f233be4d2}',
|
||||
'add_to_path': False,
|
||||
INCLUDE_FILES.append("dist/gramps")
|
||||
INCLUDE_FILES.append(
|
||||
("dist/gramps-" + ".".join(map(str, VERSION_TUPLE)) + ".data/data/share", "share")
|
||||
)
|
||||
EXECUTABLES = [
|
||||
cx_Freeze.Executable(
|
||||
"grampsaioc.py",
|
||||
base="Console",
|
||||
target_name="gramps.exe",
|
||||
icon="gramps.ico",
|
||||
copyright=COPYRIGHT,
|
||||
),
|
||||
cx_Freeze.Executable(
|
||||
"grampsaiow.py",
|
||||
base="Win32GUI",
|
||||
target_name="grampsw.exe",
|
||||
icon="gramps.ico",
|
||||
copyright=COPYRIGHT,
|
||||
),
|
||||
cx_Freeze.Executable(
|
||||
"grampsaiocd.py",
|
||||
base="Console",
|
||||
target_name="grampsd.exe",
|
||||
icon="grampsd.ico",
|
||||
copyright=COPYRIGHT,
|
||||
),
|
||||
]
|
||||
BUILD_EXE_OPTIONS = {
|
||||
"packages": PACKAGES,
|
||||
"includes": INCLUDES,
|
||||
"excludes": EXCLUDES,
|
||||
"include_files": INCLUDE_FILES,
|
||||
"bin_includes": MISSING_DLL,
|
||||
"zip_include_packages": "*", # ZIP_INCLUDE_PACKAGES,
|
||||
"zip_exclude_packages": EXCLUDES,
|
||||
"bin_excludes": BIN_EXCLUDES,
|
||||
"replace_paths": REPLACE_PATHS,
|
||||
"build_exe": BASE_DIR,
|
||||
}
|
||||
BDIST_MSI_OPTIONS = { # uuid.uuid5(uuid.NAMESPACE_DNS, 'GrampsAIO64-5-trunk')
|
||||
"upgrade_code": "{fbccc04b-7b2e-56d3-8bb7-94d5f68de822}",
|
||||
# uuid.uuid5(uuid.NAMESPACE_DNS, 'v5.0.0-alpha1-476-g473d3aa')
|
||||
"product_code": "{48304362-2945-5a10-ad60-241f233be4d2}",
|
||||
"add_to_path": False,
|
||||
#'initial_target_dir': r'[ProgramFilesFolder]\%s\%s' %
|
||||
#(company_name, product_name),
|
||||
}
|
||||
# (company_name, product_name),
|
||||
}
|
||||
cx_Freeze.setup(
|
||||
name="GrampsAIO32" if '32' in BASE_DIR else "GrampsAIO64",
|
||||
options={"build_exe": BUILD_EXE_OPTIONS, 'bdist_msi': BDIST_MSI_OPTIONS},
|
||||
name="GrampsAIO32" if "32" in BASE_DIR else "GrampsAIO64",
|
||||
options={"build_exe": BUILD_EXE_OPTIONS, "bdist_msi": BDIST_MSI_OPTIONS},
|
||||
version=VERSION,
|
||||
description="Gramps Genealogy software",
|
||||
long_description=VERSION_QUALIFIER,
|
||||
executables=EXECUTABLES)
|
||||
executables=EXECUTABLES,
|
||||
)
|
||||
|
||||
ZIN = zipfile.ZipFile(os.path.join(BASE_DIR, 'lib/library.zip'), 'r')
|
||||
ZOUT = zipfile.ZipFile(os.path.join(BASE_DIR, 'lib/pythonx.zip'), 'w')
|
||||
ZIN = zipfile.ZipFile(os.path.join(BASE_DIR, "lib/library.zip"), "r")
|
||||
ZOUT = zipfile.ZipFile(os.path.join(BASE_DIR, "lib/pythonx.zip"), "w")
|
||||
for item in ZIN.infolist():
|
||||
if not os.path.dirname(item.filename).startswith('gramps'):
|
||||
#if '/test' in item.filename or 'test/' in item.filename:
|
||||
if not os.path.dirname(item.filename).startswith("gramps"):
|
||||
# if '/test' in item.filename or 'test/' in item.filename:
|
||||
# print("Zip Excluded:", item.filename)
|
||||
#else:
|
||||
# else:
|
||||
print("Zip Included:", item.filename)
|
||||
buffer = ZIN.read(item.filename)
|
||||
ZOUT.writestr(item, buffer)
|
||||
ZOUT.close()
|
||||
ZIN.close()
|
||||
shutil.move(os.path.join(BASE_DIR, 'lib/pythonx.zip'),
|
||||
os.path.join(BASE_DIR, 'lib/library.zip'))
|
||||
shutil.move(
|
||||
os.path.join(BASE_DIR, "lib/pythonx.zip"), os.path.join(BASE_DIR, "lib/library.zip")
|
||||
)
|
||||
|
||||
if os.path.isfile(UPX_ALT_PATH):
|
||||
UPX = UPX_ALT_PATH
|
||||
else:
|
||||
WHICH = 'where' if os.name == 'nt' else 'which'
|
||||
WHICH = "where" if os.name == "nt" else "which"
|
||||
try:
|
||||
subprocess.check_call([WHICH, 'UPX'])
|
||||
subprocess.check_call([WHICH, "UPX"])
|
||||
except subprocess.CalledProcessError:
|
||||
UPX = None
|
||||
else:
|
||||
UPX = 'upx'
|
||||
UPX = "upx"
|
||||
if UPX is not None:
|
||||
ARGS = [UPX, '-7', '--no-progress']
|
||||
ARGS.extend(os.path.join(BASE_DIR, filename) for filename in
|
||||
os.listdir(BASE_DIR) if filename == 'name' or
|
||||
os.path.splitext(filename)[1].lower() in
|
||||
('.exe', '.dll', '.pyd', '.so') and
|
||||
os.path.splitext(filename)[0].lower() not in
|
||||
('libgcc_s_dw2-1', 'gramps', 'grampsw', 'grampsd',
|
||||
'libwinpthread-1'))
|
||||
ARGS = [UPX, "-7", "--no-progress"]
|
||||
ARGS.extend(
|
||||
os.path.join(BASE_DIR, filename)
|
||||
for filename in os.listdir(BASE_DIR)
|
||||
if filename == "name"
|
||||
or os.path.splitext(filename)[1].lower() in (".exe", ".dll", ".pyd", ".so")
|
||||
and os.path.splitext(filename)[0].lower()
|
||||
not in ("libgcc_s_dw2-1", "gramps", "grampsw", "grampsd", "libwinpthread-1")
|
||||
)
|
||||
subprocess.call(ARGS)
|
||||
else:
|
||||
print("\nUPX not found")
|
||||
|
|
138
data/man/conf.py
138
data/man/conf.py
|
@ -16,210 +16,204 @@ import sys, os
|
|||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
# needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = []
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
templates_path = ["_templates"]
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
source_suffix = ".rst"
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
# source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
master_doc = "index"
|
||||
|
||||
# General information about the project.
|
||||
project = u'Gramps'
|
||||
copyright = u'2015, Gramps project'
|
||||
project = "Gramps"
|
||||
copyright = "2015, Gramps project"
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '4.2'
|
||||
version = "4.2"
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '4.2.0'
|
||||
release = "4.2.0"
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#locale_dirs = './locale'
|
||||
#gettext_compact = True
|
||||
# locale_dirs = './locale'
|
||||
# gettext_compact = True
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
today_fmt = '%B %d, %Y'
|
||||
today_fmt = "%B %d, %Y"
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['_build']
|
||||
exclude_patterns = ["_build"]
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
# default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
# add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
# add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
# show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
pygments_style = "sphinx"
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
# modindex_common_prefix = []
|
||||
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
html_theme = "default"
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
# html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
# html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
# html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
# html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
# html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
# html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
#html_static_path = ['_static']
|
||||
# html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
# html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
# html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
# html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
# html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
# html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
# html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
# html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
# html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
# html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
# html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
# html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
# html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'Grampsdoc'
|
||||
htmlhelp_basename = "Grampsdoc"
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'Gramps.tex', u'Gramps Documentation',
|
||||
u'.', 'manual'),
|
||||
("index", "Gramps.tex", "Gramps Documentation", ".", "manual"),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
# latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
# latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
# latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
# latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
# latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
# latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output --------------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('en', 'gramps', u'Gramps Documentation',
|
||||
['Gramps project'], 1)
|
||||
]
|
||||
man_pages = [("en", "gramps", "Gramps Documentation", ["Gramps project"], 1)]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#man_show_urls = False
|
||||
# man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output ------------------------------------------------
|
||||
|
@ -228,16 +222,22 @@ man_pages = [
|
|||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'Gramps', u'Gramps Documentation',
|
||||
u'.', 'Gramps', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
(
|
||||
"index",
|
||||
"Gramps",
|
||||
"Gramps Documentation",
|
||||
".",
|
||||
"Gramps",
|
||||
"One line description of project.",
|
||||
"Miscellaneous",
|
||||
),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#texinfo_appendices = []
|
||||
# texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#texinfo_domain_indices = True
|
||||
# texinfo_domain_indices = True
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#texinfo_show_urls = 'footnote'
|
||||
# texinfo_show_urls = 'footnote'
|
||||
|
|
|
@ -16,210 +16,204 @@ import sys, os
|
|||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
# needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = []
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
templates_path = ["_templates"]
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
source_suffix = ".rst"
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
# source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'cs'
|
||||
master_doc = "cs"
|
||||
|
||||
# General information about the project.
|
||||
project = u'Gramps'
|
||||
copyright = u'2015, Gramps project'
|
||||
project = "Gramps"
|
||||
copyright = "2015, Gramps project"
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '4.2'
|
||||
version = "4.2"
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '4.2.0'
|
||||
release = "4.2.0"
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
locale_dirs = './locale'
|
||||
locale_dirs = "./locale"
|
||||
gettext_compact = True
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
today_fmt = '%B %d, %Y'
|
||||
today_fmt = "%B %d, %Y"
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['_build']
|
||||
exclude_patterns = ["_build"]
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
# default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
# add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
# add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
# show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
pygments_style = "sphinx"
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
# modindex_common_prefix = []
|
||||
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
html_theme = "default"
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
# html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
# html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
# html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
# html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
# html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
# html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
#html_static_path = ['_static']
|
||||
# html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
# html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
# html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
# html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
# html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
# html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
# html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
# html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
# html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
# html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
# html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
# html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
# html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'Grampsdoc'
|
||||
htmlhelp_basename = "Grampsdoc"
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'Gramps.tex', u'Gramps Documentation',
|
||||
u'.', 'manual'),
|
||||
("index", "Gramps.tex", "Gramps Documentation", ".", "manual"),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
# latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
# latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
# latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
# latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
# latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
# latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output --------------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('cs', 'gramps', u'Gramps Documentation',
|
||||
[u'.'], 1)
|
||||
]
|
||||
man_pages = [("cs", "gramps", "Gramps Documentation", ["."], 1)]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#man_show_urls = False
|
||||
# man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output ------------------------------------------------
|
||||
|
@ -228,16 +222,22 @@ man_pages = [
|
|||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'Gramps', u'Gramps Documentation',
|
||||
u'.', 'Gramps', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
(
|
||||
"index",
|
||||
"Gramps",
|
||||
"Gramps Documentation",
|
||||
".",
|
||||
"Gramps",
|
||||
"One line description of project.",
|
||||
"Miscellaneous",
|
||||
),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#texinfo_appendices = []
|
||||
# texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#texinfo_domain_indices = True
|
||||
# texinfo_domain_indices = True
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#texinfo_show_urls = 'footnote'
|
||||
# texinfo_show_urls = 'footnote'
|
||||
|
|
|
@ -16,210 +16,204 @@ import sys, os
|
|||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
# needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = []
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
templates_path = ["_templates"]
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
source_suffix = ".rst"
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
# source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'fr'
|
||||
master_doc = "fr"
|
||||
|
||||
# General information about the project.
|
||||
project = u'Gramps'
|
||||
copyright = u'2015, Gramps project'
|
||||
project = "Gramps"
|
||||
copyright = "2015, Gramps project"
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '4.2'
|
||||
version = "4.2"
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '4.2.0'
|
||||
release = "4.2.0"
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
locale_dirs = './locale'
|
||||
locale_dirs = "./locale"
|
||||
gettext_compact = True
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
today_fmt = '%d %B %Y'
|
||||
today_fmt = "%d %B %Y"
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['_build']
|
||||
exclude_patterns = ["_build"]
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
# default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
# add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
# add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
# show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
pygments_style = "sphinx"
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
# modindex_common_prefix = []
|
||||
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
html_theme = "default"
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
# html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
# html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
# html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
# html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
# html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
# html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
#html_static_path = ['_static']
|
||||
# html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
# html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
# html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
# html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
# html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
# html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
# html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
# html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
# html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
# html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
# html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
# html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
# html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'Grampsdoc'
|
||||
htmlhelp_basename = "Grampsdoc"
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'Gramps.tex', u'Gramps Documentation',
|
||||
u'.', 'manual'),
|
||||
("index", "Gramps.tex", "Gramps Documentation", ".", "manual"),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
# latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
# latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
# latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
# latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
# latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
# latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output --------------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('fr', 'gramps', u'Gramps Documentation',
|
||||
['Jerome Rapinat'], 1)
|
||||
]
|
||||
man_pages = [("fr", "gramps", "Gramps Documentation", ["Jerome Rapinat"], 1)]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#man_show_urls = False
|
||||
# man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output ------------------------------------------------
|
||||
|
@ -228,16 +222,22 @@ man_pages = [
|
|||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'Gramps', u'Gramps Documentation',
|
||||
u'.', 'Gramps', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
(
|
||||
"index",
|
||||
"Gramps",
|
||||
"Gramps Documentation",
|
||||
".",
|
||||
"Gramps",
|
||||
"One line description of project.",
|
||||
"Miscellaneous",
|
||||
),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#texinfo_appendices = []
|
||||
# texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#texinfo_domain_indices = True
|
||||
# texinfo_domain_indices = True
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#texinfo_show_urls = 'footnote'
|
||||
# texinfo_show_urls = 'footnote'
|
||||
|
|
|
@ -16,210 +16,204 @@ import sys, os
|
|||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||