diff --git a/windows/nonAIO/builder/build_GrampsWin32.py b/windows/nonAIO/builder/build_GrampsWin32.py index 2f3fc8fb1..63053b94f 100644 --- a/windows/nonAIO/builder/build_GrampsWin32.py +++ b/windows/nonAIO/builder/build_GrampsWin32.py @@ -142,7 +142,7 @@ class buildbase(GObject.GObject): outfile = file if file == 'NEWS': #Jump through hoops tomake sure the end of line charactors are windows format (wont work on linux!!) - outfile = 'NEWS.TXT' #Lets add .TXT suffix to filename so installer knows to call notepad + outfile = 'NEWS.TXT' #Lets add .TXT suffix to filename so installer knows to call notepad fnews = open(os.path.join(source_path,file), 'r') newslines = fnews.readlines() newsout = open(os.path.join(self.build_src,outfile), 'w') @@ -162,7 +162,7 @@ class buildbase(GObject.GObject): # need to ensure __file__ has full path, under linux it does not. thisfilepath = os.path.abspath(__file__) pth = os.path.relpath(os.path.dirname( thisfilepath ), os.getcwd()) - pth2nsis_script = os.path.join(pth, 'gramps2.nsi') + pth2nsis_script = os.path.join(pth, 'gramps2.nsi') #should tests be more along lines of os.name which returns 'posix', 'nt', 'mac', 'os2', 'ce', 'java', 'riscos' if sys.platform == 'win32': @@ -241,9 +241,9 @@ class buildbase(GObject.GObject): # log.error( "msgfmt not found - unable to generate mo files") # return log.info( "Generating mo files" ) - global po_errs, po_oks + global po_errs, po_oks po_total = len(po_files) - po_count = 0 + po_count = 0 for po_file in po_files: po_count = po_count + 1 #This will be interesting @@ -317,7 +317,7 @@ class buildbase(GObject.GObject): log.error( e ) def getNSISVersionNumber(self): - #Check version of NSIS, to ensure NSIS is compatible with script features + #Check version of NSIS, to ensure NSIS is compatible with script features # >"c:\Program Files\NSIS\makensis.exe" /version # v2.42 cmd = '"%s" -VERSION' % (MAKENSIS_exe) @@ -338,7 +338,7 @@ class buildbase(GObject.GObject): ver = output[1:].split('.') major = int(ver[0]) try: - minor = int(ver[1]) + minor = int(ver[1]) except ValueError as e: m = ver[1] minor = int(m[:2]) @@ -511,7 +511,7 @@ def buildGRAMPS( base, out_dir, bTarball): bo.exportSVN(os.path.join(base, 'src'), os.path.join(bo.build_root, 'src') ) bo.exportSVN(os.path.join(base, 'po'), os.path.join(bo.build_root, 'po') ) bo.exportSVN(os.path.join(base, 'example'), os.path.join(bo.build_root, 'examples') ) - bo.generateConstPy( ) + bo.generateConstPy( ) bo.copyExtraFilesToBuildDir(base) if bPatchBuild: @@ -545,9 +545,9 @@ Options: -mDIR, --msgdir=DIR Directory to msgfmt.exe -pDIR, --patch=DIR Specify a directory to patch files into the build. only valid for a tarball build. - This directory will allow you to patch the release after expanding + This directory will allow you to patch the release after expanding from tarball and before creating installer. - (n.b. each file to be replaced needs to be specified with full path + (n.b. each file to be replaced needs to be specified with full path to exactly mimic the paths in the expanded tarball) ''' # TODO: nsis_dir option - a path to nsismake (for occasions script cannot work it out) @@ -636,4 +636,4 @@ Options: #========================== sys.exit(buildGRAMPS(repository_path,out_dir, bTarball)) -GObject.type_register(buildbase) \ No newline at end of file +GObject.type_register(buildbase) diff --git a/windows/nonAIO/builder/check_gtk_install.py b/windows/nonAIO/builder/check_gtk_install.py index 4bc199a43..0257cc108 100644 --- a/windows/nonAIO/builder/check_gtk_install.py +++ b/windows/nonAIO/builder/check_gtk_install.py @@ -37,14 +37,14 @@ testdlls = ['libgdk-win32-2.0-0.dll', 'libglib-2.0-0.dll', 'libgobject-2.0-0.dll explain_exposed = ''' *********************************************************** * It seems that other installations are exposing GTK DLL's * to the operating system as they are in the environment - * path variable BEFORE the runtime directory. + * path variable BEFORE the runtime directory. * You should reorder the path variable to put your GTK - * runtime path before these other installations on the path''' + * runtime path before these other installations on the path''' explain_safe = ''' *************************************************************** * While there are other installations of GTK DLL's on the path, * it should be safe as they are on the path AFTER the runtime - * directory. ''' + * directory. ''' def RunExeCommand( app, args ): cmd = app + ' ' + args @@ -72,8 +72,8 @@ def CheckGtkInReg(): except WindowsError as e: log.info( '\n GTK registry key not found in registry' ) log.info( ''' ******************************************************************** - * This might not be an error, but means I don't know the directory to - * your preferred GTK installation. + * This might not be an error, but means I don't know the directory to + * your preferred GTK installation. * - try passing in your GTK installation path.\n''' ) log.info( '-' * 60 ) log.info( usage ) @@ -92,7 +92,7 @@ def WorkOutShortDosPath(): log.info( ' if you want this function to work' ) def FindLibsWithCtypes(): - # use ctypes to check where windows finds it's DLL's + # use ctypes to check where windows finds it's DLL's log.info( '\n==== Use ctypes to find dlls ====' ) other_paths = [] for dll in testdlls: @@ -193,7 +193,7 @@ def CheckWithDependencyWalker(): log.info( ' get dependency walker from http://www.dependencywalker.com/' ) log.info( ' and unzip into this directory for it to work.' ) -def CheckPathForOtherGtkInstalls(): +def CheckPathForOtherGtkInstalls(): log.info( '\n====Checking environment path for other gtk installations====' ) ePath = os.environ['path'] dirs = ePath.split(';') @@ -281,7 +281,7 @@ def Import_pyGtkIntoPython(): #test the gobject version try: import gobject - PrintVersionResult(' gobject', MIN_GOBJECT_VER, GObject.pygobject_version, UNTESTED_GOBJECT_VER) + PrintVersionResult(' gobject', MIN_GOBJECT_VER, GObject.pygobject_version, UNTESTED_GOBJECT_VER) except ImportError: PrintFailedImport(' gobject', MIN_GOBJECT_VER, NOT_FOUND_STR) @@ -290,7 +290,7 @@ def Import_pyGtkIntoPython(): #test the cairo version try: import cairo - PrintVersionResult(' cairo ', MIN_CAIRO_VER, cairo.version_info, UNTESTED_CAIRO_VER ) + PrintVersionResult(' cairo ', MIN_CAIRO_VER, cairo.version_info, UNTESTED_CAIRO_VER ) except ImportError: PrintFailedImport(' cairo ', MIN_CAIRO_VER, NOT_FOUND_STR) diff --git a/windows/nonAIO/builder/make_launcher.py b/windows/nonAIO/builder/make_launcher.py index bf4decaaf..da138addb 100644 --- a/windows/nonAIO/builder/make_launcher.py +++ b/windows/nonAIO/builder/make_launcher.py @@ -52,12 +52,12 @@ langLookup = { 'eo' : 'Esperanto', 'es' : 'Spanish', 'fi' : 'Finnish', - 'fr' : 'French', + 'fr' : 'French', 'ga' : 'Irish', 'he' : 'Hebrew', 'hr' : 'Croatian', 'hu' : 'Hungarian', - 'it' : 'Italian', + 'it' : 'Italian', 'ja' : 'Japanese', 'lt' : 'Lithuanian', 'mk' : 'Macedonian', @@ -73,8 +73,8 @@ langLookup = { 'sq' : 'Albanian', 'sr' : 'Serbian', 'sv' : 'Swedish', - 'tr' : 'Turkish', - 'uk' : 'Ukrainian', + 'tr' : 'Turkish', + 'uk' : 'Ukrainian', 'vi' : 'Vietnamese', 'zh_CN' : 'Chinese (PRC)', } @@ -118,17 +118,17 @@ def GetLanguageFromLocale(): lang = locale.getlocale()[0] if not lang: # if lang is empty/None - lang = locale.getdefaultlocale()[0] + lang = locale.getdefaultlocale()[0] return lang def writeLauncher(language, langcode, runtimepath, grampspath): lines = [] lines.append('''@rem Setting the working language @rem ============================ -@rem GRAMPS looks during the start-up-phase for an environment variable (called LANG) +@rem GRAMPS looks during the start-up-phase for an environment variable (called LANG) @rem to switch to a special language. It's better to use a ".CMD" or ".BAT" file to @rem control this environment variable instead a permanent setting in the windows registry, -@rem to have the possibility to go back to the GRAMPS standard language (English) in the +@rem to have the possibility to go back to the GRAMPS standard language (English) in the @rem case you want to report about a problem or a bug. ''') lines.append('\n@rem Set GRAMPS environment settings to %s \n' % language) @@ -137,9 +137,9 @@ def writeLauncher(language, langcode, runtimepath, grampspath): lines.append('''\n\n@rem Setting the configuration path @rem ============================== @rem During the boot process of GRAMPS there is a check for an environment variable -@rem called GRAMPSHOME. Without this environment variable GRAMPS uses the default +@rem called GRAMPSHOME. Without this environment variable GRAMPS uses the default @rem windows path as the location to save all configuration files: -@rem \\\gramps +@rem \\\gramps @rem If required, uncomment GRAMPSHOME line and edit to suit your use. ''') lines.append('\n@rem set the path for GRAMPS configuration files') @@ -154,7 +154,7 @@ def writeLauncher(language, langcode, runtimepath, grampspath): path = '\npath="%s";%%PATH%%' % runtimepath else: lines.append('\n@rem Uncommnet following line, and edit path to your GTK runtime') - path = "\n@rem path=PATH_TO_YOUR_GTK_RUNTIME;%%PATH%%\n" + path = "\n@rem path=PATH_TO_YOUR_GTK_RUNTIME;%%PATH%%\n" lines.append(path) lines.append('''\n\n@rem Start GRAMPS application @rem ========================= diff --git a/windows/nonAIO/builder/test_dependencies.py b/windows/nonAIO/builder/test_dependencies.py index 2657e31c4..b9f59e078 100644 --- a/windows/nonAIO/builder/test_dependencies.py +++ b/windows/nonAIO/builder/test_dependencies.py @@ -26,7 +26,7 @@ py_str = 'found %d.%d.%d' % sys.version_info[:3] try: import gtk try: - gtkver_str = 'found %d.%d.%d' % Gtk.gtk_version + gtkver_str = 'found %d.%d.%d' % Gtk.gtk_version except : # any failure to 'get' the version gtkver_str = 'unknown version' try: @@ -52,7 +52,7 @@ except ImportError: try: import cairo try: - cairover_str = 'found %d.%d.%d' % cairo.version_info + cairover_str = 'found %d.%d.%d' % cairo.version_info except :# any failure to 'get' the version cairover_str = 'unknown version' @@ -63,4 +63,4 @@ print('python:%s;'%py_str) print('gtk++:%s;'%gtkver_str) print('pygtk:%s;'%pygtkver_str) print('gobject:%s;'%gobjectver_str) -print('cairo:%s;'%cairover_str) \ No newline at end of file +print('cairo:%s;'%cairover_str) diff --git a/windows/nonAIO/check_gtk_install.py b/windows/nonAIO/check_gtk_install.py index bbcea5e39..b9c909421 100644 --- a/windows/nonAIO/check_gtk_install.py +++ b/windows/nonAIO/check_gtk_install.py @@ -32,7 +32,7 @@ testdlls = ['libgdk-win32-2.0-0.dll', 'libglib-2.0-0.dll', 'libgobject-2.0-0.dll explain_exposed = ''' *********************************************************** * It seems that other installations are exposing GTK DLL's * to the operating system as they are in the environment - * path variable BEFORE the runtime directory. + * path variable BEFORE the runtime directory. * You should reorder the path variable to put your GTK * runtime path before these other installations on the path''' @@ -67,7 +67,7 @@ def CheckGtkInReg(): except WindowsError as e: print('\n GTK registry key not found in registry') print(''' ******************************************************************** - * This might not be an error, but means I don't know the directory to + * This might not be an error, but means I don't know the directory to * your preferred GTK installation. * - try passing in your GTK installation path.\n''') print('-' * 60) @@ -121,7 +121,7 @@ def ScanDependencyFileForErrors(fname): for line in lines: if line.startswith(" Module"): # work out were paths end pthend_idx = line.find("File Time Stamp") - acceptablePaths = [ dllPathShort.lower(), + acceptablePaths = [ dllPathShort.lower(), dllPathInRegistry.lower(), os.path.join(sysroot, 'system32').lower() ] @@ -249,7 +249,7 @@ def PrintVersionResult(appl, minVersion, actualVersion, untestedVersion): print(appl,) print('version %d.%d.%d or above.....\t' % minVersion ,) print('found %d.%d.%d' % actualVersion ,) - if minVersion <= actualVersion < untestedVersion: + if minVersion <= actualVersion < untestedVersion: print('...OK') elif actualVersion >= untestedVersion: print('...UNTESTED VERSION') @@ -287,7 +287,7 @@ def Import_pyGtkIntoPython(): #test the cairo version try: import cairo - PrintVersionResult(' cairo ', MIN_CAIRO_VER, cairo.version_info, UNTESTED_CAIRO_VER ) + PrintVersionResult(' cairo ', MIN_CAIRO_VER, cairo.version_info, UNTESTED_CAIRO_VER ) except ImportError: PrintFailedImport(' cairo ', MIN_CAIRO_VER, NOT_FOUND_STR)