Mock Version: 2.0 Mock Version: 2.0 Mock Version: 2.0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-gflags.spec'], chrootPath='/var/lib/mock/1258307-epel-8-x86_64-1582820364.960518/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.tp56mvw5:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=FalseprintOutput=True) ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-gflags.spec'], chrootPath='/var/lib/mock/1258307-epel-8-x86_64-1582820364.960518/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.tp56mvw5:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=FalseprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.tp56mvw5:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.tp56mvw5:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '26b6bdbc51c243c2ab0bf5999227d896', '-D', '/var/lib/mock/1258307-epel-8-x86_64-1582820364.960518/root', '-a', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.tp56mvw5:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=en_US.UTF-8', '-u', 'mockbuild', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-gflags.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '26b6bdbc51c243c2ab0bf5999227d896', '-D', '/var/lib/mock/1258307-epel-8-x86_64-1582820364.960518/root', '-a', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.tp56mvw5:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=en_US.UTF-8', '-u', 'mockbuild', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-gflags.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False Building target platforms: x86_64 Building target platforms: x86_64 Building for target x86_64 Building for target x86_64 Wrote: /builddir/build/SRPMS/python-gflags-2.0-17.el8.src.rpm Wrote: /builddir/build/SRPMS/python-gflags-2.0-17.el8.src.rpm Child return code was: 0 Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-gflags.spec'], chrootPath='/var/lib/mock/1258307-epel-8-x86_64-1582820364.960518/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.tp56mvw5:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=FalseprintOutput=True) ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-gflags.spec'], chrootPath='/var/lib/mock/1258307-epel-8-x86_64-1582820364.960518/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.tp56mvw5:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=FalseprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.tp56mvw5:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.tp56mvw5:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '4d0d19bda3554b88a8317623a9ee76c0', '-D', '/var/lib/mock/1258307-epel-8-x86_64-1582820364.960518/root', '-a', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.tp56mvw5:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=en_US.UTF-8', '-u', 'mockbuild', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-gflags.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '4d0d19bda3554b88a8317623a9ee76c0', '-D', '/var/lib/mock/1258307-epel-8-x86_64-1582820364.960518/root', '-a', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.tp56mvw5:/etc/resolv.conf', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=en_US.UTF-8', '-u', 'mockbuild', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/python-gflags.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False Building target platforms: x86_64 Building target platforms: x86_64 Building for target x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.9WDrnM Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.9WDrnM + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf python-gflags-2.0 + rm -rf python-gflags-2.0 + /usr/bin/mkdir -p python-gflags-2.0 + /usr/bin/mkdir -p python-gflags-2.0 + cd python-gflags-2.0 + cd python-gflags-2.0 + /usr/bin/gzip -dc /builddir/build/SOURCES/python-gflags-2.0.tar.gz + /usr/bin/gzip -dc /builddir/build/SOURCES/python-gflags-2.0.tar.gz + /usr/bin/tar -xof - + /usr/bin/tar -xof - + STATUS=0 + STATUS=0 + '[' 0 -ne 0 ']' + '[' 0 -ne 0 ']' + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + mv python-gflags-2.0 python2 + mv python-gflags-2.0 python2 + sed -i '1s|^#!/usr/bin/env python$|#!/usr/bin/python2|' python2/gflags2man.py + sed -i '1s|^#!/usr/bin/env python$|#!/usr/bin/python2|' python2/gflags2man.py + sed -i '/^#!\/usr\/bin\/env python$/,+1 d' python2/gflags.py python2/gflags2man.py python2/gflags_validators.py + sed -i '/^#!\/usr\/bin\/env python$/,+1 d' python2/gflags.py python2/gflags2man.py python2/gflags_validators.py + cp -a python2 python3 + cp -a python2 python3 + sed -i '1s|^#!/usr/bin/python2$|#!/usr/bin/python3.6|' python3/gflags2man.py + sed -i '1s|^#!/usr/bin/python2$|#!/usr/bin/python3.6|' python3/gflags2man.py + 2to3 --write --nobackup python3 + 2to3 --write --nobackup python3 RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored python3/gflags.py RefactoringTool: Refactored python3/gflags.py --- python3/gflags.py (original) --- python3/gflags.py (original) +++ python3/gflags.py (refactored) +++ python3/gflags.py (refactored) @@ -581,7 +581,7 @@ @@ -581,7 +581,7 @@ space_prefix_len = len(common_prefix) - len(common_prefix.lstrip()) space_prefix_len = len(common_prefix) - len(common_prefix.lstrip()) # If we have a common space prefix, drop it from all lines # If we have a common space prefix, drop it from all lines if space_prefix_len: if space_prefix_len: - for index in xrange(len(text_lines)): - for index in xrange(len(text_lines)): + for index in range(len(text_lines)): + for index in range(len(text_lines)): if text_lines[index]: if text_lines[index]: text_lines[index] = text_lines[index][space_prefix_len:] text_lines[index] = text_lines[index][space_prefix_len:] return '\n'.join(text_first_line + text_lines) return '\n'.join(text_first_line + text_lines) @@ -743,7 +743,7 @@ @@ -743,7 +743,7 @@ # a parallel thread imports a module while we iterate over # a parallel thread imports a module while we iterate over # .iteritems() (not nice, but possible), we get a RuntimeError ... # .iteritems() (not nice, but possible), we get a RuntimeError ... # Hence, we use the slightly slower but safer .items(). # Hence, we use the slightly slower but safer .items(). - for name, module in sys.modules.items(): - for name, module in sys.modules.items(): + for name, module in list(sys.modules.items()): + for name, module in list(sys.modules.items()): if getattr(module, '__dict__', None) is globals_dict: if getattr(module, '__dict__', None) is globals_dict: if name == '__main__': if name == '__main__': # Pick a more informative name for the main module. # Pick a more informative name for the main module. @@ -962,7 +962,7 @@ @@ -962,7 +962,7 @@ If no such module exists (i.e. no flag with this name exists), If no such module exists (i.e. no flag with this name exists), we return default. we return default. """ """ - for module, flags in self.FlagsByModuleDict().iteritems(): - for module, flags in self.FlagsByModuleDict().iteritems(): + for module, flags in self.FlagsByModuleDict().items(): + for module, flags in self.FlagsByModuleDict().items(): for flag in flags: for flag in flags: if flag.name == flagname or flag.short_name == flagname: if flag.name == flagname or flag.short_name == flagname: return module return module @@ -981,7 +981,7 @@ @@ -981,7 +981,7 @@ If no such module exists (i.e. no flag with this name exists), If no such module exists (i.e. no flag with this name exists), we return default. we return default. """ """ - for module_id, flags in self.FlagsByModuleIdDict().iteritems(): - for module_id, flags in self.FlagsByModuleIdDict().iteritems(): + for module_id, flags in self.FlagsByModuleIdDict().items(): + for module_id, flags in self.FlagsByModuleIdDict().items(): for flag in flags: for flag in flags: if flag.name == flagname or flag.short_name == flagname: if flag.name == flagname or flag.short_name == flagname: return module_id return module_id @@ -993,7 +993,7 @@ @@ -993,7 +993,7 @@ Args: Args: flag_values: registry to copy from flag_values: registry to copy from """ """ - for flag_name, flag in flag_values.FlagDict().iteritems(): - for flag_name, flag in flag_values.FlagDict().iteritems(): + for flag_name, flag in flag_values.FlagDict().items(): + for flag_name, flag in flag_values.FlagDict().items(): # Each flags with shortname appears here twice (once under its # Each flags with shortname appears here twice (once under its # normal name, and again with its short name). To prevent # normal name, and again with its short name). To prevent # problems (DuplicateFlagError) with double flag registration, we # problems (DuplicateFlagError) with double flag registration, we @@ -1066,7 +1066,7 @@ @@ -1066,7 +1066,7 @@ def _AssertAllValidators(self): def _AssertAllValidators(self): all_validators = set() all_validators = set() - for flag in self.FlagDict().itervalues(): - for flag in self.FlagDict().itervalues(): + for flag in self.FlagDict().values(): + for flag in self.FlagDict().values(): for validator in flag.validators: for validator in flag.validators: all_validators.add(validator) all_validators.add(validator) self._AssertValidators(all_validators) self._AssertValidators(all_validators) @@ -1086,7 +1086,7 @@ @@ -1086,7 +1086,7 @@ validators, key=lambda validator: validator.insertion_index): validators, key=lambda validator: validator.insertion_index): try: try: validator.Verify(self) validator.Verify(self) - except gflags_validators.Error, e: - except gflags_validators.Error, e: + except gflags_validators.Error as e: + except gflags_validators.Error as e: message = validator.PrintFlagsWithValues(self) message = validator.PrintFlagsWithValues(self) raise IllegalFlagValue('%s: %s' % (message, str(e))) raise IllegalFlagValue('%s: %s' % (message, str(e))) @@ -1161,7 +1161,7 @@ @@ -1161,7 +1161,7 @@ flags. flags. flag_obj: A flag object. flag_obj: A flag object. """ """ - for unused_module, flags_in_module in flags_by_module_dict.iteritems(): - for unused_module, flags_in_module in flags_by_module_dict.iteritems(): + for unused_module, flags_in_module in flags_by_module_dict.items(): + for unused_module, flags_in_module in flags_by_module_dict.items(): # while (as opposed to if) takes care of multiple occurrences of a # while (as opposed to if) takes care of multiple occurrences of a # flag in the list for the same module. # flag in the list for the same module. while flag_obj in flags_in_module: while flag_obj in flags_in_module: @@ -1220,7 +1220,7 @@ @@ -1220,7 +1220,7 @@ # full forms: --mybool=(true|false). # full forms: --mybool=(true|false). original_argv = list(argv) # list() makes a copy original_argv = list(argv) # list() makes a copy shortest_matches = None shortest_matches = None - for name, flag in fl.items(): - for name, flag in fl.items(): + for name, flag in list(fl.items()): + for name, flag in list(fl.items()): if not flag.boolean: if not flag.boolean: continue continue if shortest_matches is None: if shortest_matches is None: @@ -1244,7 +1244,7 @@ @@ -1244,7 +1244,7 @@ # specified as a string of letters, each letter followed by a colon # specified as a string of letters, each letter followed by a colon # if it takes an argument. Long options are stored in an array of # if it takes an argument. Long options are stored in an array of # strings. Each string ends with an '=' if it takes an argument. # strings. Each string ends with an '=' if it takes an argument. - for name, flag in fl.items(): - for name, flag in fl.items(): + for name, flag in list(fl.items()): + for name, flag in list(fl.items()): longopts.append(name + "=") longopts.append(name + "=") if len(name) == 1: # one-letter option: allow short flag type also if len(name) == 1: # one-letter option: allow short flag type also shortopts += name shortopts += name @@ -1265,7 +1265,7 @@ @@ -1265,7 +1265,7 @@ else: else: optlist, unparsed_args = getopt.getopt(args, shortopts, longopts) optlist, unparsed_args = getopt.getopt(args, shortopts, longopts) break break - except getopt.GetoptError, e: - except getopt.GetoptError, e: + except getopt.GetoptError as e: + except getopt.GetoptError as e: if not e.opt or e.opt in fl: if not e.opt or e.opt in fl: # Not an unrecognized option, re-raise the exception as a FlagsError # Not an unrecognized option, re-raise the exception as a FlagsError raise FlagsError(e) raise FlagsError(e) @@ -1333,7 +1333,7 @@ @@ -1333,7 +1333,7 @@ def Reset(self): def Reset(self): """Resets the values to the point before FLAGS(argv) was called.""" """Resets the values to the point before FLAGS(argv) was called.""" - for f in self.FlagDict().values(): - for f in self.FlagDict().values(): + for f in list(self.FlagDict().values()): + for f in list(self.FlagDict().values()): f.Unparse() f.Unparse() def RegisteredFlags(self): def RegisteredFlags(self): @@ -1373,13 +1373,13 @@ @@ -1373,13 +1373,13 @@ self.__RenderOurModuleFlags(module, helplist) self.__RenderOurModuleFlags(module, helplist) self.__RenderModuleFlags('gflags', self.__RenderModuleFlags('gflags', - _SPECIAL_FLAGS.FlagDict().values(), - _SPECIAL_FLAGS.FlagDict().values(), + list(_SPECIAL_FLAGS.FlagDict().values()), + list(_SPECIAL_FLAGS.FlagDict().values()), helplist) helplist) else: else: # Just print one long list of flags. # Just print one long list of flags. self.__RenderFlagList( self.__RenderFlagList( - self.FlagDict().values() + _SPECIAL_FLAGS.FlagDict().values(), - self.FlagDict().values() + _SPECIAL_FLAGS.FlagDict().values(), + list(self.FlagDict().values()) + list(_SPECIAL_FLAGS.FlagDict().values()), + list(self.FlagDict().values()) + list(_SPECIAL_FLAGS.FlagDict().values()), helplist, prefix) helplist, prefix) return '\n'.join(helplist) return '\n'.join(helplist) @@ -1486,7 +1486,7 @@ @@ -1486,7 +1486,7 @@ """Returns: dictionary; maps flag names to their shortest unique prefix.""" """Returns: dictionary; maps flag names to their shortest unique prefix.""" # Sort the list of flag names # Sort the list of flag names sorted_flags = [] sorted_flags = [] - for name, flag in fl.items(): - for name, flag in fl.items(): + for name, flag in list(fl.items()): + for name, flag in list(fl.items()): sorted_flags.append(name) sorted_flags.append(name) if flag.boolean: if flag.boolean: sorted_flags.append('no%s' % name) sorted_flags.append('no%s' % name) @@ -1568,7 +1568,7 @@ @@ -1568,7 +1568,7 @@ flag_line_list = [] # Subset of lines w/o comments, blanks, flagfile= tags. flag_line_list = [] # Subset of lines w/o comments, blanks, flagfile= tags. try: try: file_obj = open(filename, 'r') file_obj = open(filename, 'r') - except IOError, e_msg: - except IOError, e_msg: + except IOError as e_msg: + except IOError as e_msg: raise CantOpenFlagFileError('ERROR:: Unable to open flagfile: %s' % e_msg) raise CantOpenFlagFileError('ERROR:: Unable to open flagfile: %s' % e_msg) line_list = file_obj.readlines() line_list = file_obj.readlines() @@ -1680,7 +1680,7 @@ @@ -1680,7 +1680,7 @@ from http://code.google.com/p/google-gflags from http://code.google.com/p/google-gflags """ """ s = '' s = '' - for flag in self.FlagDict().values(): - for flag in self.FlagDict().values(): + for flag in list(self.FlagDict().values()): + for flag in list(self.FlagDict().values()): if flag.value is not None: if flag.value is not None: s += flag.Serialize() + '\n' s += flag.Serialize() + '\n' return s return s @@ -1767,7 +1767,7 @@ @@ -1767,7 +1767,7 @@ try: try: return str(value) return str(value) except UnicodeEncodeError: except UnicodeEncodeError: - return unicode(value) - return unicode(value) + return str(value) + return str(value) def _MakeXMLSafe(s): def _MakeXMLSafe(s): @@ -1881,7 +1881,7 @@ @@ -1881,7 +1881,7 @@ def Parse(self, argument): def Parse(self, argument): try: try: self.value = self.parser.Parse(argument) self.value = self.parser.Parse(argument) - except ValueError, e: # recast ValueError as IllegalFlagValue - except ValueError, e: # recast ValueError as IllegalFlagValue + except ValueError as e: # recast ValueError as IllegalFlagValue + except ValueError as e: # recast ValueError as IllegalFlagValue raise IllegalFlagValue("flag --%s=%s: %s" % (self.name, argument, e)) raise IllegalFlagValue("flag --%s=%s: %s" % (self.name, argument, e)) self.present += 1 self.present += 1 @@ -2028,7 +2028,7 @@ @@ -2028,7 +2028,7 @@ return type.__call__(mcs, *args) return type.__call__(mcs, *args) -class ArgumentParser(object): -class ArgumentParser(object): +class ArgumentParser(object, metaclass=_ArgumentParserCache): +class ArgumentParser(object, metaclass=_ArgumentParserCache): """Base class used to parse and convert arguments. """Base class used to parse and convert arguments. The Parse() method checks to make sure that the string argument is a The Parse() method checks to make sure that the string argument is a @@ -2043,7 +2043,6 @@ @@ -2043,7 +2043,6 @@ and shared between flags. Initializer arguments are allowed, but all and shared between flags. Initializer arguments are allowed, but all member variables must be derived from initializer arguments only. member variables must be derived from initializer arguments only. """ """ - __metaclass__ = _ArgumentParserCache - __metaclass__ = _ArgumentParserCache syntactic_help = "" syntactic_help = "" @@ -2294,7 +2293,7 @@ @@ -2294,7 +2293,7 @@ # a different module. So, we can't use _GetKeyFlagsForModule. # a different module. So, we can't use _GetKeyFlagsForModule. # Instead, we take all flags from _SPECIAL_FLAGS (a private # Instead, we take all flags from _SPECIAL_FLAGS (a private # FlagValues, where no other module should register flags). # FlagValues, where no other module should register flags). - [f.name for f in _SPECIAL_FLAGS.FlagDict().values()], - [f.name for f in _SPECIAL_FLAGS.FlagDict().values()], + [f.name for f in list(_SPECIAL_FLAGS.FlagDict().values())], + [f.name for f in list(_SPECIAL_FLAGS.FlagDict().values())], flag_values=_SPECIAL_FLAGS, flag_values=_SPECIAL_FLAGS, key_flag_values=flag_values) key_flag_values=flag_values) @@ -2394,10 +2393,10 @@ @@ -2394,10 +2393,10 @@ if arg: if arg: doc = sys.modules["__main__"].__doc__ doc = sys.modules["__main__"].__doc__ flags = str(FLAGS) flags = str(FLAGS) - print doc or ("\nUSAGE: %s [flags]\n" % sys.argv[0]) - print doc or ("\nUSAGE: %s [flags]\n" % sys.argv[0]) + print(doc or ("\nUSAGE: %s [flags]\n" % sys.argv[0])) + print(doc or ("\nUSAGE: %s [flags]\n" % sys.argv[0])) if flags: if flags: - print "flags:" - print "flags:" - print flags - print flags + print("flags:") + print("flags:") + print(flags) + print(flags) sys.exit(1) sys.exit(1) class HelpXMLFlag(BooleanFlag): class HelpXMLFlag(BooleanFlag): """Similar to HelpFlag, but generates output in XML format.""" """Similar to HelpFlag, but generates output in XML format.""" @@ -2424,10 +2423,10 @@ @@ -2424,10 +2423,10 @@ if arg: if arg: doc = sys.modules["__main__"].__doc__ doc = sys.modules["__main__"].__doc__ flags = FLAGS.MainModuleHelp() flags = FLAGS.MainModuleHelp() - print doc or ("\nUSAGE: %s [flags]\n" % sys.argv[0]) - print doc or ("\nUSAGE: %s [flags]\n" % sys.argv[0]) + print(doc or ("\nUSAGE: %s [flags]\n" % sys.argv[0]))RefactoringTool: Refactored python3/gflags2man.py + print(doc or ("\nUSAGE: %s [flags]\n" % sys.argv[0]))RefactoringTool: Refactored python3/gflags2man.py RefactoringTool: No changes to python3/gflags_validators.py RefactoringTool: No changes to python3/gflags_validators.py RefactoringTool: No changes to python3/setup.py RefactoringTool: No changes to python3/setup.py RefactoringTool: Refactored python3/tests/gflags_googletest.py RefactoringTool: Refactored python3/tests/gflags_googletest.py RefactoringTool: Refactored python3/tests/gflags_helpxml_test.py RefactoringTool: Refactored python3/tests/gflags_helpxml_test.py RefactoringTool: Refactored python3/tests/gflags_unittest.py RefactoringTool: Refactored python3/tests/gflags_unittest.py if flags: if flags: - print "flags:" - print "flags:" - print flags - print flags + print("flags:") + print("flags:") + print(flags) + print(flags) sys.exit(1) sys.exit(1) # # --- python3/gflags2man.py (original) --- python3/gflags2man.py (original) +++ python3/gflags2man.py (refactored) +++ python3/gflags2man.py (refactored) @@ -81,18 +81,18 @@ @@ -81,18 +81,18 @@ class Logging: class Logging: """A super-simple logging class""" """A super-simple logging class""" - def error(self, msg): print >>sys.stderr, "ERROR: ", msg - def error(self, msg): print >>sys.stderr, "ERROR: ", msg - def warn(self, msg): print >>sys.stderr, "WARNING: ", msg - def warn(self, msg): print >>sys.stderr, "WARNING: ", msg - def info(self, msg): print msg - def info(self, msg): print msg + def error(self, msg): print("ERROR: ", msg, file=sys.stderr) + def error(self, msg): print("ERROR: ", msg, file=sys.stderr) + def warn(self, msg): print("WARNING: ", msg, file=sys.stderr) + def warn(self, msg): print("WARNING: ", msg, file=sys.stderr) + def info(self, msg): print(msg) + def info(self, msg): print(msg) def debug(self, msg): self.vlog(1, msg) def debug(self, msg): self.vlog(1, msg) def vlog(self, level, msg): def vlog(self, level, msg): - if FLAGS.v >= level: print msg - if FLAGS.v >= level: print msg + if FLAGS.v >= level: print(msg) + if FLAGS.v >= level: print(msg) logging = Logging() logging = Logging() class App: class App: def usage(self, shorthelp=0): def usage(self, shorthelp=0): - print >>sys.stderr, __doc__ - print >>sys.stderr, __doc__ - print >>sys.stderr, "flags:" - print >>sys.stderr, "flags:" - print >>sys.stderr, str(FLAGS) - print >>sys.stderr, str(FLAGS) + print(__doc__, file=sys.stderr) + print(__doc__, file=sys.stderr) + print("flags:", file=sys.stderr) + print("flags:", file=sys.stderr) + print(str(FLAGS), file=sys.stderr) + print(str(FLAGS), file=sys.stderr) def run(self): def run(self): main(sys.argv) main(sys.argv) app = App() app = App() --- python3/tests/gflags_googletest.py (original) --- python3/tests/gflags_googletest.py (original) +++ python3/tests/gflags_googletest.py (refactored) +++ python3/tests/gflags_googletest.py (refactored) @@ -49,10 +49,10 @@ @@ -49,10 +49,10 @@ if actual == expected: if actual == expected: return True return True - print "Error: FLAGS.MainModuleHelp() didn't return the expected result." - print "Error: FLAGS.MainModuleHelp() didn't return the expected result." - print "Got:" - print "Got:" - print actual - print actual - print "[End of got]" - print "[End of got]" + print("Error: FLAGS.MainModuleHelp() didn't return the expected result.") + print("Error: FLAGS.MainModuleHelp() didn't return the expected result.") + print("Got:") + print("Got:") + print(actual) + print(actual) + print("[End of got]") + print("[End of got]") actual_lines = actual.split("\n") actual_lines = actual.split("\n") expected_lines = expected.split("\n") expected_lines = expected.split("\n") @@ -61,28 +61,28 @@ @@ -61,28 +61,28 @@ num_expected_lines = len(expected_lines) num_expected_lines = len(expected_lines) if num_actual_lines != num_expected_lines: if num_actual_lines != num_expected_lines: - print "Number of actual lines = %d, expected %d" % ( - print "Number of actual lines = %d, expected %d" % ( - num_actual_lines, num_expected_lines) - num_actual_lines, num_expected_lines) + print("Number of actual lines = %d, expected %d" % ( + print("Number of actual lines = %d, expected %d" % ( + num_actual_lines, num_expected_lines)) + num_actual_lines, num_expected_lines)) num_to_match = min(num_actual_lines, num_expected_lines) num_to_match = min(num_actual_lines, num_expected_lines) for i in range(num_to_match): for i in range(num_to_match): if actual_lines[i] != expected_lines[i]: if actual_lines[i] != expected_lines[i]: - print "One discrepancy: Got:" - print "One discrepancy: Got:" - print actual_lines[i] - print actual_lines[i] - print "Expected:" - print "Expected:" - print expected_lines[i] - print expected_lines[i] + print("One discrepancy: Got:") + print("One discrepancy: Got:") + print(actual_lines[i]) + print(actual_lines[i]) + print("Expected:") + print("Expected:") + print(expected_lines[i]) + print(expected_lines[i]) break break else: else: # If we got here, found no discrepancy, print first new line. # If we got here, found no discrepancy, print first new line. if num_actual_lines > num_expected_lines: if num_actual_lines > num_expected_lines: - print "New help line:" - print "New help line:" - print actual_lines[num_expected_lines] - print actual_lines[num_expected_lines] + print("New help line:") + print("New help line:") + print(actual_lines[num_expected_lines]) + print(actual_lines[num_expected_lines]) elif num_expected_lines > num_actual_lines: elif num_expected_lines > num_actual_lines: - print "Missing expected help line:" - print "Missing expected help line:" - print expected_lines[num_actual_lines] - print expected_lines[num_actual_lines] + print("Missing expected help line:") + print("Missing expected help line:") + print(expected_lines[num_actual_lines]) + print(expected_lines[num_actual_lines]) else: else: - print "Bug in this test -- discrepancy detected but not found." - print "Bug in this test -- discrepancy detected but not found." + print("Bug in this test -- discrepancy detected but not found.") + print("Bug in this test -- discrepancy detected but not found.") return False return False @@ -108,7 +108,7 @@ @@ -108,7 +108,7 @@ def assertRaisesWithRegexpMatch(self, exception, regexp, fn, *args, **kwargs): def assertRaisesWithRegexpMatch(self, exception, regexp, fn, *args, **kwargs): try: try: fn(*args, **kwargs) fn(*args, **kwargs) - except exception, why: - except exception, why: + except exception as why: + except exception as why: self.assertTrue(re.search(regexp, str(why)), self.assertTrue(re.search(regexp, str(why)), "'%s' does not match '%s'" % (regexp, why)) "'%s' does not match '%s'" % (regexp, why)) return return --- python3/tests/gflags_helpxml_test.py (original) --- python3/tests/gflags_helpxml_test.py (original) +++ python3/tests/gflags_helpxml_test.py (refactored) +++ python3/tests/gflags_helpxml_test.py (refactored) @@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@ import string import string -import StringIO -import StringIO +import io +import io import sys import sys import xml.dom.minidom import xml.dom.minidom import xml.sax.saxutils import xml.sax.saxutils @@ -96,7 +96,7 @@ @@ -96,7 +96,7 @@ def _CheckFlagHelpInXML(self, flag_name, module_name, def _CheckFlagHelpInXML(self, flag_name, module_name, expected_output, is_key=False): expected_output, is_key=False): # StringIO.StringIO is a file object that writes into a memory string. # StringIO.StringIO is a file object that writes into a memory string. - sio = StringIO.StringIO() - sio = StringIO.StringIO() + sio = io.StringIO() + sio = io.StringIO() flag_obj = self.fv[flag_name] flag_obj = self.fv[flag_name] flag_obj.WriteInfoInXMLFormat(sio, module_name, is_key=is_key, indent=' ') flag_obj.WriteInfoInXMLFormat(sio, module_name, is_key=is_key, indent=' ') self.assertMultiLineEqual(sio.getvalue(), expected_output) self.assertMultiLineEqual(sio.getvalue(), expected_output) @@ -496,7 +496,7 @@ @@ -496,7 +496,7 @@ gflags.DECLARE_key_flag('tmod_bar_u', flag_values=fv) gflags.DECLARE_key_flag('tmod_bar_u', flag_values=fv) # Generate flag help in XML format in the StringIO sio. # Generate flag help in XML format in the StringIO sio. - sio = StringIO.StringIO() - sio = StringIO.StringIO() + sio = io.StringIO() + sio = io.StringIO() fv.WriteHelpInXMLFormat(sio) fv.WriteHelpInXMLFormat(sio) # Check that we got the expected result. # Check that we got the expected result. --- python3/tests/gflags_unittest.py (original) --- python3/tests/gflags_unittest.py (original) +++ python3/tests/gflags_unittest.py (refactored) +++ python3/tests/gflags_unittest.py (refactored) @@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@ __pychecker__ = "no-local" # for unittest __pychecker__ = "no-local" # for unittest -import cStringIO -import cStringIO +import io +import io import sys import sys import os import os import shutil import shutil @@ -169,8 +169,8 @@ @@ -169,8 +169,8 @@ assert 'numbers' in FLAGS.RegisteredFlags() assert 'numbers' in FLAGS.RegisteredFlags() # has_key # has_key - assert FLAGS.has_key('name') - assert FLAGS.has_key('name') - assert not FLAGS.has_key('name2') - assert not FLAGS.has_key('name2') + assert 'name' in FLAGS + assert 'name' in FLAGS + assert 'name2' not in FLAGS + assert 'name2' not in FLAGS assert 'name' in FLAGS assert 'name' in FLAGS assert 'name2' not in FLAGS assert 'name2' not in FLAGS @@ -216,24 +216,24 @@ @@ -216,24 +216,24 @@ # Test integer argument passing # Test integer argument passing argv = ('./program', '--x', '0x12345') argv = ('./program', '--x', '0x12345') argv = FLAGS(argv) argv = FLAGS(argv) - self.assertEquals(FLAGS.x, 0x12345) - self.assertEquals(FLAGS.x, 0x12345) - self.assertEquals(type(FLAGS.x), int) - self.assertEquals(type(FLAGS.x), int) + self.assertEqual(FLAGS.x, 0x12345) + self.assertEqual(FLAGS.x, 0x12345) + self.assertEqual(type(FLAGS.x), int) + self.assertEqual(type(FLAGS.x), int) argv = ('./program', '--x', '0x1234567890ABCDEF1234567890ABCDEF') argv = ('./program', '--x', '0x1234567890ABCDEF1234567890ABCDEF') argv = FLAGS(argv) argv = FLAGS(argv) - self.assertEquals(FLAGS.x, 0x1234567890ABCDEF1234567890ABCDEF) - self.assertEquals(FLAGS.x, 0x1234567890ABCDEF1234567890ABCDEF) - self.assertEquals(type(FLAGS.x), long) - self.assertEquals(type(FLAGS.x), long) + self.assertEqual(FLAGS.x, 0x1234567890ABCDEF1234567890ABCDEF) + self.assertEqual(FLAGS.x, 0x1234567890ABCDEF1234567890ABCDEF) + self.assertEqual(type(FLAGS.x), int) + self.assertEqual(type(FLAGS.x), int) # Treat 0-prefixed parameters as base-10, not base-8 # Treat 0-prefixed parameters as base-10, not base-8 argv = ('./program', '--x', '012345') argv = ('./program', '--x', '012345') argv = FLAGS(argv) argv = FLAGS(argv) - self.assertEquals(FLAGS.x, 12345) - self.assertEquals(FLAGS.x, 12345) - self.assertEquals(type(FLAGS.x), int) - self.assertEquals(type(FLAGS.x), int) + self.assertEqual(FLAGS.x, 12345) + self.assertEqual(FLAGS.x, 12345) + self.assertEqual(type(FLAGS.x), int) + self.assertEqual(type(FLAGS.x), int) argv = ('./program', '--x', '0123459') argv = ('./program', '--x', '0123459') argv = FLAGS(argv) argv = FLAGS(argv) - self.assertEquals(FLAGS.x, 123459) - self.assertEquals(FLAGS.x, 123459) - self.assertEquals(type(FLAGS.x), int) - self.assertEquals(type(FLAGS.x), int) + self.assertEqual(FLAGS.x, 123459) + self.assertEqual(FLAGS.x, 123459) + self.assertEqual(type(FLAGS.x), int) + self.assertEqual(type(FLAGS.x), int) argv = ('./program', '--x', '0x123efg') argv = ('./program', '--x', '0x123efg') try: try: @@ -314,7 +314,7 @@ @@ -314,7 +314,7 @@ for lst in lists: for lst in lists: argv = ('./program', '--%s=%s' % (name, sep.join(lst))) argv = ('./program', '--%s=%s' % (name, sep.join(lst))) argv = FLAGS(argv) argv = FLAGS(argv) - self.assertEquals(getattr(FLAGS, name), lst) - self.assertEquals(getattr(FLAGS, name), lst) + self.assertEqual(getattr(FLAGS, name), lst) + self.assertEqual(getattr(FLAGS, name), lst) # Test help text # Test help text flagsHelp = str(FLAGS) flagsHelp = str(FLAGS) @@ -497,7 +497,7 @@ @@ -497,7 +497,7 @@ gflags.DEFINE_boolean("zoom1", 0, "runhelp z1", short_name='z') gflags.DEFINE_boolean("zoom1", 0, "runhelp z1", short_name='z') gflags.DEFINE_boolean("zoom2", 0, "runhelp z2", short_name='z') gflags.DEFINE_boolean("zoom2", 0, "runhelp z2", short_name='z') raise AssertionError("duplicate short flag detection failed") raise AssertionError("duplicate short flag detection failed") - except gflags.DuplicateFlag, e: - except gflags.DuplicateFlag, e: + except gflags.DuplicateFlag as e: + except gflags.DuplicateFlag as e: self.assertTrue("The flag 'z' is defined twice. " in e.args[0]) self.assertTrue("The flag 'z' is defined twice. " in e.args[0]) self.assertTrue("First from" in e.args[0]) self.assertTrue("First from" in e.args[0]) self.assertTrue(", Second from" in e.args[0]) self.assertTrue(", Second from" in e.args[0]) @@ -507,7 +507,7 @@ @@ -507,7 +507,7 @@ gflags.DEFINE_boolean("short1", 0, "runhelp s1", short_name='s') gflags.DEFINE_boolean("short1", 0, "runhelp s1", short_name='s') gflags.DEFINE_boolean("s", 0, "runhelp s2") gflags.DEFINE_boolean("s", 0, "runhelp s2") raise AssertionError("duplicate mixed flag detection failed") raise AssertionError("duplicate mixed flag detection failed") - except gflags.DuplicateFlag, e: - except gflags.DuplicateFlag, e: + except gflags.DuplicateFlag as e: + except gflags.DuplicateFlag as e: self.assertTrue("The flag 's' is defined twice. " in e.args[0]) self.assertTrue("The flag 's' is defined twice. " in e.args[0]) self.assertTrue("First from" in e.args[0]) self.assertTrue("First from" in e.args[0]) self.assertTrue(", Second from" in e.args[0]) self.assertTrue(", Second from" in e.args[0]) @@ -521,7 +521,7 @@ @@ -521,7 +521,7 @@ duplicate_flags = module_foo.DuplicateFlags(flagnames) duplicate_flags = module_foo.DuplicateFlags(flagnames) try: try: original_flags.AppendFlagValues(duplicate_flags) original_flags.AppendFlagValues(duplicate_flags) - except gflags.DuplicateFlagError, e: - except gflags.DuplicateFlagError, e: + except gflags.DuplicateFlagError as e: + except gflags.DuplicateFlagError as e: self.assertTrue("flags_unittest" in str(e)) self.assertTrue("flags_unittest" in str(e)) self.assertTrue("module_foo" in str(e)) self.assertTrue("module_foo" in str(e)) @@ -580,8 +580,8 @@ @@ -580,8 +580,8 @@ allow_override=1) allow_override=1) gflags.DEFINE_boolean("dup3", 1, "runhelp d32", short_name='u', gflags.DEFINE_boolean("dup3", 1, "runhelp d32", short_name='u', allow_override=1) allow_override=1) - self.assert_(str(FLAGS).find('runhelp d31') == -1) - self.assert_(str(FLAGS).find('runhelp d31') == -1) - self.assert_(str(FLAGS).find('runhelp d32') != -1) - self.assert_(str(FLAGS).find('runhelp d32') != -1) + self.assertTrue(str(FLAGS).find('runhelp d31') == -1) + self.assertTrue(str(FLAGS).find('runhelp d31') == -1) + self.assertTrue(str(FLAGS).find('runhelp d32') != -1) + self.assertTrue(str(FLAGS).find('runhelp d32') != -1) # Make sure AppendFlagValues works # Make sure AppendFlagValues works new_flags = gflags.FlagValues() new_flags = gflags.FlagValues() @@ -782,12 +782,12 @@ @@ -782,12 +782,12 @@ 'float option that can occur multiple times', 'float option that can occur multiple times', short_name='mf')RefactoringTool: Refactored python3/tests/gflags_validators_test.py short_name='mf')RefactoringTool: Refactored python3/tests/gflags_validators_test.py for (expected, actual) in zip(float_defaults, FLAGS.get('m_float', None)): for (expected, actual) in zip(float_defaults, FLAGS.get('m_float', None)): - self.assertAlmostEquals(expected, actual) - self.assertAlmostEquals(expected, actual) + self.assertAlmostEqual(expected, actual) + self.assertAlmostEqual(expected, actual) argv = ('./program', '--m_float=-17', '--mf=2.78e9') argv = ('./program', '--m_float=-17', '--mf=2.78e9') FLAGS(argv) FLAGS(argv) expected_floats = [-17.0, 2.78e9] expected_floats = [-17.0, 2.78e9] for (expected, actual) in zip(expected_floats, FLAGS.get('m_float', None)): for (expected, actual) in zip(expected_floats, FLAGS.get('m_float', None)): - self.assertAlmostEquals(expected, actual) - self.assertAlmostEquals(expected, actual) + self.assertAlmostEqual(expected, actual) + self.assertAlmostEqual(expected, actual) def testSingleValueDefault(self): def testSingleValueDefault(self): """Test multi_int and multi_float flags with a single default value.""" """Test multi_int and multi_float flags with a single default value.""" @@ -800,8 +800,8 @@ @@ -800,8 +800,8 @@ gflags.DEFINE_multi_float('m_float1', float_default, gflags.DEFINE_multi_float('m_float1', float_default, 'float option that can occur multiple times') 'float option that can occur multiple times') actual = FLAGS.get('m_float1', None) actual = FLAGS.get('m_float1', None) - self.assertEquals(1, len(actual)) - self.assertEquals(1, len(actual)) - self.assertAlmostEquals(actual[0], float_default) - self.assertAlmostEquals(actual[0], float_default) + self.assertEqual(1, len(actual)) + self.assertEqual(1, len(actual)) + self.assertAlmostEqual(actual[0], float_default) + self.assertAlmostEqual(actual[0], float_default) def testBadMultiNumericalFlags(self): def testBadMultiNumericalFlags(self): """Test multi_int and multi_float flags with non-parseable values.""" """Test multi_int and multi_float flags with non-parseable values.""" @@ -866,7 +866,7 @@ @@ -866,7 +866,7 @@ gflags.DEFINE_list("non_unicode", ["abc", "def", "ghi"], gflags.DEFINE_list("non_unicode", ["abc", "def", "ghi"], "help:\xC3\xAD".decode("utf-8")) "help:\xC3\xAD".decode("utf-8")) - outfile = cStringIO.StringIO() - outfile = cStringIO.StringIO() + outfile = io.StringIO() + outfile = io.StringIO() FLAGS.WriteHelpInXMLFormat(outfile) FLAGS.WriteHelpInXMLFormat(outfile) actual_output = outfile.getvalue() actual_output = outfile.getvalue() @@ -924,9 +924,9 @@ @@ -924,9 +924,9 @@ tmp_flag_file_2 = open(tmp_path + '/UnitTestFile2.tst', 'w') tmp_flag_file_2 = open(tmp_path + '/UnitTestFile2.tst', 'w') tmp_flag_file_3 = open(tmp_path + '/UnitTestFile3.tst', 'w') tmp_flag_file_3 = open(tmp_path + '/UnitTestFile3.tst', 'w') tmp_flag_file_4 = open(tmp_path + '/UnitTestFile4.tst', 'w') tmp_flag_file_4 = open(tmp_path + '/UnitTestFile4.tst', 'w') - except IOError, e_msg: - except IOError, e_msg: - print e_msg - print e_msg - print 'FAIL\n File Creation problem in Unit Test' - print 'FAIL\n File Creation problem in Unit Test' + except IOError as e_msg: + except IOError as e_msg: + print(e_msg) + print(e_msg) + print('FAIL\n File Creation problem in Unit Test') + print('FAIL\n File Creation problem in Unit Test') sys.exit(1) sys.exit(1) # put some dummy flags in our test files # put some dummy flags in our test files @@ -971,8 +971,8 @@ @@ -971,8 +971,8 @@ for file_name in self.files_to_delete: for file_name in self.files_to_delete: try: try: os.remove(file_name) os.remove(file_name) - except OSError, e_msg: - except OSError, e_msg: - print '%s\n, Problem deleting test file' % e_msg - print '%s\n, Problem deleting test file' % e_msg + except OSError as e_msg: + except OSError as e_msg: + print('%s\n, Problem deleting test file' % e_msg) + print('%s\n, Problem deleting test file' % e_msg) #end RemoveTestFiles def #end RemoveTestFiles def def _ReadFlagsFromFiles(self, argv, force_gnu): def _ReadFlagsFromFiles(self, argv, force_gnu): @@ -1261,8 +1261,8 @@ @@ -1261,8 +1261,8 @@ 'nocommon': 'nocommon', 'nocommon': 'nocommon', 'common': 'common'} 'common': 'common'} - for name, shorter in expected_results.iteritems(): - for name, shorter in expected_results.iteritems(): - self.assertEquals(shorter_flags[name], shorter) - self.assertEquals(shorter_flags[name], shorter) + for name, shorter in expected_results.items(): + for name, shorter in expected_results.items(): + self.assertEqual(shorter_flags[name], shorter) + self.assertEqual(shorter_flags[name], shorter) self.flag_values.__delattr__('a') self.flag_values.__delattr__('a') self.flag_values.__delattr__('abc') self.flag_values.__delattr__('abc') @@ -1322,7 +1322,7 @@ @@ -1322,7 +1322,7 @@ argv = ('./program', '--nosuchflag', '--name=Bob', 'extra') argv = ('./program', '--nosuchflag', '--name=Bob', 'extra') self.flag_values(argv) self.flag_values(argv) raise AssertionError("Unknown flag exception not raised") raise AssertionError("Unknown flag exception not raised") - except gflags.UnrecognizedFlag, e: - except gflags.UnrecognizedFlag, e: + except gflags.UnrecognizedFlag as e: + except gflags.UnrecognizedFlag as e: assert e.flagname == 'nosuchflag' assert e.flagname == 'nosuchflag' assert e.flagvalue == '--nosuchflag' assert e.flagvalue == '--nosuchflag' @@ -1331,7 +1331,7 @@ @@ -1331,7 +1331,7 @@ argv = ('./program', '-w', '--name=Bob', 'extra') argv = ('./program', '-w', '--name=Bob', 'extra') self.flag_values(argv) self.flag_values(argv) raise AssertionError("Unknown flag exception not raised") raise AssertionError("Unknown flag exception not raised") - except gflags.UnrecognizedFlag, e: - except gflags.UnrecognizedFlag, e: + except gflags.UnrecognizedFlag as e: + except gflags.UnrecognizedFlag as e: assert e.flagname == 'w' assert e.flagname == 'w' assert e.flagvalue == '-w' assert e.flagvalue == '-w' @@ -1340,7 +1340,7 @@ @@ -1340,7 +1340,7 @@ argv = ('./program', '--nosuchflagwithparam=foo', '--name=Bob', 'extra') argv = ('./program', '--nosuchflagwithparam=foo', '--name=Bob', 'extra') self.flag_values(argv) self.flag_values(argv) raise AssertionError("Unknown flag exception not raised") raise AssertionError("Unknown flag exception not raised") - except gflags.UnrecognizedFlag, e: - except gflags.UnrecognizedFlag, e: + except gflags.UnrecognizedFlag as e: + except gflags.UnrecognizedFlag as e: assert e.flagname == 'nosuchflagwithparam' assert e.flagname == 'nosuchflagwithparam' assert e.flagvalue == '--nosuchflagwithparam=foo' assert e.flagvalue == '--nosuchflagwithparam=foo' @@ -1366,7 +1366,7 @@ @@ -1366,7 +1366,7 @@ '--undefok=nosuchfla', 'extra') '--undefok=nosuchfla', 'extra') self.flag_values(argv) self.flag_values(argv) raise AssertionError("Unknown flag exception not raised") raise AssertionError("Unknown flag exception not raised") - except gflags.UnrecognizedFlag, e: - except gflags.UnrecognizedFlag, e: + except gflags.UnrecognizedFlag as e: + except gflags.UnrecognizedFlag as e: assert e.flagname == 'nosuchflag' assert e.flagname == 'nosuchflag' try: try: @@ -1374,7 +1374,7 @@ @@ -1374,7 +1374,7 @@ '--undefok=nosuchflagg', 'extra') '--undefok=nosuchflagg', 'extra') self.flag_values(argv) self.flag_values(argv) raise AssertionError("Unknown flag exception not raised") raise AssertionError("Unknown flag exception not raised") - except gflags.UnrecognizedFlag, e: - except gflags.UnrecognizedFlag, e: + except gflags.UnrecognizedFlag as e: + except gflags.UnrecognizedFlag as e: assert e.flagname == 'nosuchflag' assert e.flagname == 'nosuchflag' # Allow unknown short flag -w if specified with undefok # Allow unknown short flag -w if specified with undefok @@ -1409,7 +1409,7 @@ @@ -1409,7 +1409,7 @@ '--undefok=another_such', 'extra') '--undefok=another_such', 'extra') self.flag_values(argv) self.flag_values(argv) raise AssertionError("Unknown flag exception not raised") raise AssertionError("Unknown flag exception not raised") - except gflags.UnrecognizedFlag, e: - except gflags.UnrecognizedFlag, e: + except gflags.UnrecognizedFlag as e: + except gflags.UnrecognizedFlag as e: assert e.flagname == 'nosuchflag' assert e.flagname == 'nosuchflag' # Make sure --undefok doesn't mask other option errors. # Make sure --undefok doesn't mask other option errors. @@ -1458,7 +1458,7 @@ @@ -1458,7 +1458,7 @@ try: try: argv = nonglobal_flags(argv) argv = nonglobal_flags(argv) raise AssertionError("Unknown flag exception not raised") raise AssertionError("Unknown flag exception not raised") - except gflags.UnrecognizedFlag, e: - except gflags.UnrecognizedFlag, e: + except gflags.UnrecognizedFlag as e: + except gflags.UnrecognizedFlag as e: assert e.flagname == 'nosuchflag' assert e.flagname == 'nosuchflag' pass pass @@ -1491,7 +1491,7 @@ @@ -1491,7 +1491,7 @@ flag_values = gflags.FlagValues() flag_values = gflags.FlagValues() gflags.DEFINE_string('delattr_foo', default_value, 'A simple flag.', gflags.DEFINE_string('delattr_foo', default_value, 'A simple flag.', flag_values=flag_values) flag_values=flag_values) - self.assertEquals(flag_values.delattr_foo, default_value) - self.assertEquals(flag_values.delattr_foo, default_value) + self.assertEqual(flag_values.delattr_foo, default_value) + self.assertEqual(flag_values.delattr_foo, default_value) flag_obj = flag_values['delattr_foo'] flag_obj = flag_values['delattr_foo'] # We also check that _FlagIsRegistered works as expected :) # We also check that _FlagIsRegistered works as expected :) self.assertTrue(flag_values._FlagIsRegistered(flag_obj)) self.assertTrue(flag_values._FlagIsRegistered(flag_obj)) @@ -1934,11 +1934,11 @@ @@ -1934,11 +1934,11 @@ try: try: self.flag_values.__setattr__(flag_name, flag_value) self.flag_values.__setattr__(flag_name, flag_value) raise AssertionError('Bounds exception not raised!') raise AssertionError('Bounds exception not raised!') - except gflags.IllegalFlagValue, e: - except gflags.IllegalFlagValue, e: + except gflags.IllegalFlagValue as e: + except gflags.IllegalFlagValue as e: expected = ('flag --%(name)s=%(value)s: %(value)s is not %(suffix)s' % expected = ('flag --%(name)s=%(value)s: %(value)s is not %(suffix)s' % {'name': flag_name, 'value': flag_value, {'name': flag_name, 'value': flag_value, 'suffix': expected_message_suffix}) 'suffix': expected_message_suffix}) - self.assertEquals(str(e), expected) - self.assertEquals(str(e), expected) + self.assertEqual(str(e), expected) + self.assertEqual(str(e), expected) def main(): def main(): --- python3/tests/gflags_validators_test.py (original) --- python3/tests/gflags_validators_test.py (original) +++ python3/tests/gflags_validators_test.py (refactored) +++ python3/tests/gflags_validators_test.py (refactored) @@ -63,10 +63,10 @@ @@ -63,10 +63,10 @@ argv = ('./program') argv = ('./program') self.flag_values(argv) self.flag_values(argv) - self.assertEquals(None, self.flag_values.test_flag) - self.assertEquals(None, self.flag_values.test_flag) + self.assertEqual(None, self.flag_values.test_flag) + self.assertEqual(None, self.flag_values.test_flag) self.flag_values.test_flag = 2 self.flag_values.test_flag = 2 - self.assertEquals(2, self.flag_values.test_flag) - self.assertEquals(2, self.flag_values.test_flag) - self.assertEquals([None, 2], self.call_args) - self.assertEquals([None, 2], self.call_args) + self.assertEqual(2, self.flag_values.test_flag) + self.assertEqual(2, self.flag_values.test_flag) + self.assertEqual([None, 2], self.call_args) + self.assertEqual([None, 2], self.call_args) def testDefaultValueNotUsedSuccess(self): def testDefaultValueNotUsedSuccess(self): def Checker(x): def Checker(x): @@ -81,8 +81,8 @@ @@ -81,8 +81,8 @@ argv = ('./program', '--test_flag=1') argv = ('./program', '--test_flag=1') self.flag_values(argv) self.flag_values(argv) - self.assertEquals(1, self.flag_values.test_flag) - self.assertEquals(1, self.flag_values.test_flag) - self.assertEquals([1], self.call_args) - self.assertEquals([1], self.call_args) + self.assertEqual(1, self.flag_values.test_flag) + self.assertEqual(1, self.flag_values.test_flag) + self.assertEqual([1], self.call_args) + self.assertEqual([1], self.call_args) def testValidatorNotCalledWhenOtherFlagIsChanged(self): def testValidatorNotCalledWhenOtherFlagIsChanged(self): def Checker(x): def Checker(x): @@ -99,9 +99,9 @@ @@ -99,9 +99,9 @@ argv = ('./program') argv = ('./program') self.flag_values(argv) self.flag_values(argv) - self.assertEquals(1, self.flag_values.test_flag) - self.assertEquals(1, self.flag_values.test_flag) + self.assertEqual(1, self.flag_values.test_flag) + self.assertEqual(1, self.flag_values.test_flag) self.flag_values.other_flag = 3 self.flag_values.other_flag = 3 - self.assertEquals([1], self.call_args) - self.assertEquals([1], self.call_args) + self.assertEqual([1], self.call_args) + self.assertEqual([1], self.call_args) def testExceptionRaisedIfCheckerFails(self): def testExceptionRaisedIfCheckerFails(self): def Checker(x): def Checker(x): @@ -119,9 +119,9 @@ @@ -119,9 +119,9 @@ try: try: self.flag_values.test_flag = 2 self.flag_values.test_flag = 2 raise AssertionError('gflags.IllegalFlagValue expected') raise AssertionError('gflags.IllegalFlagValue expected') - except gflags.IllegalFlagValue, e: - except gflags.IllegalFlagValue, e: - self.assertEquals('flag --test_flag=2: Errors happen', str(e)) - self.assertEquals('flag --test_flag=2: Errors happen', str(e)) - self.assertEquals([1, 2], self.call_args) - self.assertEquals([1, 2], self.call_args) + except gflags.IllegalFlagValue as e: + except gflags.IllegalFlagValue as e: + self.assertEqual('flag --test_flag=2: Errors happen', str(e)) + self.assertEqual('flag --test_flag=2: Errors happen', str(e)) + self.assertEqual([1, 2], self.call_args) + self.assertEqual([1, 2], self.call_args) def testExceptionRaisedIfCheckerRaisesException(self): def testExceptionRaisedIfCheckerRaisesException(self): def Checker(x): def Checker(x): @@ -141,9 +141,9 @@ @@ -141,9 +141,9 @@ try: try: self.flag_values.test_flag = 2 self.flag_values.test_flag = 2 raise AssertionError('gflags.IllegalFlagValue expected') raise AssertionError('gflags.IllegalFlagValue expected') - except gflags.IllegalFlagValue, e: - except gflags.IllegalFlagValue, e: - self.assertEquals('flag --test_flag=2: Specific message', str(e)) - self.assertEquals('flag --test_flag=2: Specific message', str(e)) - self.assertEquals([1, 2], self.call_args) - self.assertEquals([1, 2], self.call_args) + except gflags.IllegalFlagValue as e:RefactoringTool: Refactored python3/tests/flags_modules_for_testing/module_bar.py + except gflags.IllegalFlagValue as e:RefactoringTool: Refactored python3/tests/flags_modules_for_testing/module_bar.py RefactoringTool: No changes to python3/tests/flags_modules_for_testing/module_baz.py RefactoringTool: No changes to python3/tests/flags_modules_for_testing/module_baz.py RefactoringTool: No changes to python3/tests/flags_modules_for_testing/module_foo.py RefactoringTool: No changes to python3/tests/flags_modules_for_testing/module_foo.py RefactoringTool: Files that were modified: RefactoringTool: Files that were modified: RefactoringTool: python3/gflags.py RefactoringTool: python3/gflags.py RefactoringTool: python3/gflags2man.py RefactoringTool: python3/gflags2man.py RefactoringTool: python3/gflags_validators.py RefactoringTool: python3/gflags_validators.py RefactoringTool: python3/setup.py RefactoringTool: python3/setup.py RefactoringTool: python3/tests/gflags_googletest.py RefactoringTool: python3/tests/gflags_googletest.py RefactoringTool: python3/tests/gflags_helpxml_test.py RefactoringTool: python3/tests/gflags_helpxml_test.py RefactoringTool: python3/tests/gflags_unittest.py RefactoringTool: python3/tests/gflags_unittest.py RefactoringTool: python3/tests/gflags_validators_test.py RefactoringTool: python3/tests/gflags_validators_test.py RefactoringTool: python3/tests/flags_modules_for_testing/module_bar.py RefactoringTool: python3/tests/flags_modules_for_testing/module_bar.py RefactoringTool: python3/tests/flags_modules_for_testing/module_baz.py RefactoringTool: python3/tests/flags_modules_for_testing/module_baz.py RefactoringTool: python3/tests/flags_modules_for_testing/module_foo.py RefactoringTool: python3/tests/flags_modules_for_testing/module_foo.py + self.assertEqual('flag --test_flag=2: Specific message', str(e)) + self.assertEqual('flag --test_flag=2: Specific message', str(e)) + self.assertEqual([1, 2], self.call_args) + self.assertEqual([1, 2], self.call_args) def testErrorMessageWhenCheckerReturnsFalseOnStart(self): def testErrorMessageWhenCheckerReturnsFalseOnStart(self): def Checker(x): def Checker(x): @@ -160,9 +160,9 @@ @@ -160,9 +160,9 @@ try: try: self.flag_values(argv) self.flag_values(argv) raise AssertionError('gflags.IllegalFlagValue expected') raise AssertionError('gflags.IllegalFlagValue expected') - except gflags.IllegalFlagValue, e: - except gflags.IllegalFlagValue, e: - self.assertEquals('flag --test_flag=1: Errors happen', str(e)) - self.assertEquals('flag --test_flag=1: Errors happen', str(e)) - self.assertEquals([1], self.call_args) - self.assertEquals([1], self.call_args) + except gflags.IllegalFlagValue as e: + except gflags.IllegalFlagValue as e: + self.assertEqual('flag --test_flag=1: Errors happen', str(e)) + self.assertEqual('flag --test_flag=1: Errors happen', str(e)) + self.assertEqual([1], self.call_args) + self.assertEqual([1], self.call_args) def testErrorMessageWhenCheckerRaisesExceptionOnStart(self): def testErrorMessageWhenCheckerRaisesExceptionOnStart(self): def Checker(x): def Checker(x): @@ -179,9 +179,9 @@ @@ -179,9 +179,9 @@ try: try: self.flag_values(argv) self.flag_values(argv) raise AssertionError('IllegalFlagValue expected') raise AssertionError('IllegalFlagValue expected') - except gflags.IllegalFlagValue, e: - except gflags.IllegalFlagValue, e: - self.assertEquals('flag --test_flag=1: Specific message', str(e)) - self.assertEquals('flag --test_flag=1: Specific message', str(e)) - self.assertEquals([1], self.call_args) - self.assertEquals([1], self.call_args) + except gflags.IllegalFlagValue as e: + except gflags.IllegalFlagValue as e: + self.assertEqual('flag --test_flag=1: Specific message', str(e)) + self.assertEqual('flag --test_flag=1: Specific message', str(e)) + self.assertEqual([1], self.call_args) + self.assertEqual([1], self.call_args) def testValidatorsCheckedInOrder(self): def testValidatorsCheckedInOrder(self): @@ -195,11 +195,11 @@ @@ -195,11 +195,11 @@ self.calls = [] self.calls = [] self._DefineFlagAndValidators(Required, Even) self._DefineFlagAndValidators(Required, Even) - self.assertEquals(['Required', 'Even'], self.calls) - self.assertEquals(['Required', 'Even'], self.calls) + self.assertEqual(['Required', 'Even'], self.calls) + self.assertEqual(['Required', 'Even'], self.calls) self.calls = [] self.calls = [] self._DefineFlagAndValidators(Even, Required) self._DefineFlagAndValidators(Even, Required) - self.assertEquals(['Even', 'Required'], self.calls) - self.assertEquals(['Even', 'Required'], self.calls) + self.assertEqual(['Even', 'Required'], self.calls) + self.assertEqual(['Even', 'Required'], self.calls) def _DefineFlagAndValidators(self, first_validator, second_validator): def _DefineFlagAndValidators(self, first_validator, second_validator): local_flags = gflags.FlagValues() local_flags = gflags.FlagValues() --- python3/tests/flags_modules_for_testing/module_bar.py (original) --- python3/tests/flags_modules_for_testing/module_bar.py (original) +++ python3/tests/flags_modules_for_testing/module_bar.py (refactored) +++ python3/tests/flags_modules_for_testing/module_bar.py (refactored) @@ -132,4 +132,4 @@ @@ -132,4 +132,4 @@ """ """ # Indeed, using exec generates a lint warning. But some user code # Indeed, using exec generates a lint warning. But some user code # actually uses exec, and we have to test for it ... # actually uses exec, and we have to test for it ... - exec code in global_dict - exec code in global_dict + exec(code, global_dict) + exec(code, global_dict) + exit 0 + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.oa79LX Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.oa79LX + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD ~/build/BUILD/python-gflags-2.0/python2 ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0/python2 ~/build/BUILD/python-gflags-2.0 + cd python-gflags-2.0 + cd python-gflags-2.0 + pushd python2 + pushd python2 + /usr/bin/python2 setup.py build + /usr/bin/python2 setup.py build running build running build running build_py running build_py creating build creating build creating build/lib creating build/lib copying gflags.py -> build/lib copying gflags.py -> build/lib copying gflags_validators.py -> build/lib copying gflags_validators.py -> build/lib running egg_info running egg_info writing python_gflags.egg-info/PKG-INFO writing python_gflags.egg-info/PKG-INFO writing top-level names to python_gflags.egg-info/top_level.txt writing top-level names to python_gflags.egg-info/top_level.txt writing dependency_links to python_gflags.egg-info/dependency_links.txt writing dependency_links to python_gflags.egg-info/dependency_links.txt reading manifest file 'python_gflags.egg-info/SOURCES.txt' reading manifest file 'python_gflags.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' reading manifest template 'MANIFEST.in' writing manifest file 'python_gflags.egg-info/SOURCES.txt' writing manifest file 'python_gflags.egg-info/SOURCES.txt' + popd + popd ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0/python3 ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0/python3 ~/build/BUILD/python-gflags-2.0 + pushd python3 + pushd python3 + /usr/bin/python3.6 setup.py build + /usr/bin/python3.6 setup.py build running build running build running build_py running build_py creating build creating build creating build/lib creating build/lib copying gflags.py -> build/lib copying gflags.py -> build/lib copying gflags_validators.py -> build/lib copying gflags_validators.py -> build/lib running egg_info running egg_info writing python_gflags.egg-info/PKG-INFO writing python_gflags.egg-info/PKG-INFO writing dependency_links to python_gflags.egg-info/dependency_links.txt writing dependency_links to python_gflags.egg-info/dependency_links.txt writing top-level names to python_gflags.egg-info/top_level.txt writing top-level names to python_gflags.egg-info/top_level.txt reading manifest file 'python_gflags.egg-info/SOURCES.txt' reading manifest file 'python_gflags.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' reading manifest template 'MANIFEST.in' writing manifest file 'python_gflags.egg-info/SOURCES.txt' writing manifest file 'python_gflags.egg-info/SOURCES.txt' + popd + popd ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0 + exit 0 + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.FwMzba Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.FwMzba + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 '!=' / ']' + '[' /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 + rm -rf /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 ++ dirname /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 ++ dirname /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 + mkdir -p /builddir/build/BUILDROOT + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 + mkdir /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 + cd python-gflags-2.0 + cd python-gflags-2.0 ~/build/BUILD/python-gflags-2.0/python3 ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0/python3 ~/build/BUILD/python-gflags-2.0 + pushd python3 + pushd python3 + /usr/bin/python3.6 setup.py install --skip-build --root /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 + /usr/bin/python3.6 setup.py install --skip-build --root /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 running install running install running install_lib running install_lib creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6 creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6 creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6/site-packages creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6/site-packages copying build/lib/gflags_validators.py -> /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6/site-packages copying build/lib/gflags_validators.py -> /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6/site-packages copying build/lib/gflags.py -> /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6/site-packages copying build/lib/gflags.py -> /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6/site-packages byte-compiling /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6/site-packages/gflags_validators.py to gflags_validators.cpython-36.pyc byte-compiling /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6/site-packages/gflags_validators.py to gflags_validators.cpython-36.pyc byte-compiling /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6/site-packages/gflags.py to gflags.cpython-36.pyc byte-compiling /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6/site-packages/gflags.py to gflags.cpython-36.pyc running install_data running install_data creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin copying gflags2man.py -> /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin copying gflags2man.py -> /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin running install_egg_info running install_egg_info running egg_info running egg_info writing python_gflags.egg-info/PKG-INFO writing python_gflags.egg-info/PKG-INFO writing dependency_links to python_gflags.egg-info/dependency_links.txt writing dependency_links to python_gflags.egg-info/dependency_links.txt writing top-level names to python_gflags.egg-info/top_level.txt writing top-level names to python_gflags.egg-info/top_level.txt reading manifest file 'python_gflags.egg-info/SOURCES.txt' reading manifest file 'python_gflags.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' reading manifest template 'MANIFEST.in' writing manifest file 'python_gflags.egg-info/SOURCES.txt' writing manifest file 'python_gflags.egg-info/SOURCES.txt' Copying python_gflags.egg-info to /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6/site-packages/python_gflags-2.0-py3.6.egg-info Copying python_gflags.egg-info to /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6/site-packages/python_gflags-2.0-py3.6.egg-info running install_scripts running install_scripts + mv /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin/gflags2man.py /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin/gflags2man-3 + mv /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin/gflags2man.py /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin/gflags2man-3 + chmod +x /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin/gflags2man-3 + chmod +x /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin/gflags2man-3 + popd + popd ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0/python2 ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0/python2 ~/build/BUILD/python-gflags-2.0 + pushd python2 + pushd python2 + /usr/bin/python2 setup.py install --skip-build --root /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 + /usr/bin/python2 setup.py install --skip-build --root /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 running install running install running install_lib running install_lib creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7 creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7 creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7/site-packages creating /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7/site-packages copying build/lib/gflags_validators.py -> /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7/site-packages copying build/lib/gflags_validators.py -> /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7/site-packages copying build/lib/gflags.py -> /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7/site-packages copying build/lib/gflags.py -> /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7/site-packages byte-compiling /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7/site-packages/gflags_validators.py to gflags_validators.pyc byte-compiling /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7/site-packages/gflags_validators.py to gflags_validators.pyc byte-compiling /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7/site-packages/gflags.py to gflags.pyc byte-compiling /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7/site-packages/gflags.py to gflags.pyc running install_data running install_data copying gflags2man.py -> /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin copying gflags2man.py -> /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin running install_egg_info running install_egg_info running egg_info running egg_info writing python_gflags.egg-info/PKG-INFO writing python_gflags.egg-info/PKG-INFO writing top-level names to python_gflags.egg-info/top_level.txt writing top-level names to python_gflags.egg-info/top_level.txt writing dependency_links to python_gflags.egg-info/dependency_links.txt writing dependency_links to python_gflags.egg-info/dependency_links.txt reading manifest file 'python_gflags.egg-info/SOURCES.txt' reading manifest file 'python_gflags.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' reading manifest template 'MANIFEST.in' writing manifest file 'python_gflags.egg-info/SOURCES.txt' writing manifest file 'python_gflags.egg-info/SOURCES.txt' Copying python_gflags.egg-info to /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7/site-packages/python_gflags-2.0-py2.7.egg-info Copying python_gflags.egg-info to /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7/site-packages/python_gflags-2.0-py2.7.egg-info running install_scripts running install_scripts + mv /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin/gflags2man.py /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin/gflags2man + mv /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin/gflags2man.py /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin/gflags2man + chmod +x /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin/gflags2man + chmod +x /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/bin/gflags2man + popd + popd ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0 + /usr/lib/rpm/find-debuginfo.sh -j2 --strict-build-id -m -i --build-id-seed 2.0-17.el8 --unique-debug-suffix -2.0-17.el8.x86_64 --unique-debug-src-base python-gflags-2.0-17.el8.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 -S debugsourcefiles.list /builddir/build/BUILD/python-gflags-2.0 + /usr/lib/rpm/find-debuginfo.sh -j2 --strict-build-id -m -i --build-id-seed 2.0-17.el8 --unique-debug-suffix -2.0-17.el8.x86_64 --unique-debug-src-base python-gflags-2.0-17.el8.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 -S debugsourcefiles.list /builddir/build/BUILD/python-gflags-2.0 find: 'debug': No such file or directory find: 'debug': No such file or directory + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/redhat/brp-ldconfig /sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory /sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile 1 + /usr/lib/rpm/brp-python-bytecompile 1 Bytecompiling .py files below /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7 using /usr/bin/python2.7 Bytecompiling .py files below /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python2.7 using /usr/bin/python2.7 Bytecompiling .py files below /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6 using /usr/libexec/platform-python Bytecompiling .py files below /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/lib/python3.6 using /usr/libexec/platform-python + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/brp-python-hardlink + PYTHON3=/usr/bin/python3.6 + PYTHON3=/usr/bin/python3.6 + /usr/lib/rpm/redhat/brp-mangle-shebangs + /usr/lib/rpm/redhat/brp-mangle-shebangs Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.diQ4Fo Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.diQ4Fo + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD ~/build/BUILD/python-gflags-2.0/python2 ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0/python2 ~/build/BUILD/python-gflags-2.0 + cd python-gflags-2.0 + cd python-gflags-2.0 + pushd python2 + pushd python2 + /usr/bin/python2 setup.py test + /usr/bin/python2 setup.py test running test running test running egg_info running egg_info writing python_gflags.egg-info/PKG-INFO writing python_gflags.egg-info/PKG-INFO writing top-level names to python_gflags.egg-info/top_level.txt writing top-level names to python_gflags.egg-info/top_level.txt writing dependency_links to python_gflags.egg-info/dependency_links.txt writing dependency_links to python_gflags.egg-info/dependency_links.txt reading manifest file 'python_gflags.egg-info/SOURCES.txt' reading manifest file 'python_gflags.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' reading manifest template 'MANIFEST.in' writing manifest file 'python_gflags.egg-info/SOURCES.txt' writing manifest file 'python_gflags.egg-info/SOURCES.txt' running build_ext running build_ext ---------------------------------------------------------------------- ---------------------------------------------------------------------- Ran 0 tests in 0.000s Ran 0 tests in 0.000s OK OK + popd + popd ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0/python3 ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0/python3 ~/build/BUILD/python-gflags-2.0 + pushd python3 + pushd python3 + /usr/bin/python3.6 setup.py test + /usr/bin/python3.6 setup.py test running test running test running egg_info running egg_info writing python_gflags.egg-info/PKG-INFO writing python_gflags.egg-info/PKG-INFO writing dependency_links to python_gflags.egg-info/dependency_links.txt writing dependency_links to python_gflags.egg-info/dependency_links.txt writing top-level names to python_gflags.egg-info/top_level.txt writing top-level names to python_gflags.egg-info/top_level.txt reading manifest file 'python_gflags.egg-info/SOURCES.txt' reading manifest file 'python_gflags.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' reading manifest template 'MANIFEST.in' writing manifest file 'python_gflags.egg-info/SOURCES.txt' writing manifest file 'python_gflags.egg-info/SOURCES.txt' running build_ext running build_ext ---------------------------------------------------------------------- ---------------------------------------------------------------------- Ran 0 tests in 0.000s Ran 0 tests in 0.000s OK OK ~/build/BUILD/python-gflags-2.0 ~/build/BUILD/python-gflags-2.0 Processing files: python2-gflags-2.0-17.el8.noarch Processing files: python2-gflags-2.0-17.el8.noarch + popd + popd + exit 0 + exit 0 Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.UPXxoE Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.UPXxoE + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + cd python-gflags-2.0 + cd python-gflags-2.0 + DOCDIR=/builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python2-gflags + DOCDIR=/builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python2-gflags + export LC_ALL=C + export LC_ALL=C + LC_ALL=C + LC_ALL=C + export DOCDIR + export DOCDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python2-gflags + /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python2-gflags + cp -pr python2/AUTHORS /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python2-gflags + cp -pr python2/AUTHORS /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python2-gflags + cp -pr python2/ChangeLog /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python2-gflags + cp -pr python2/ChangeLog /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python2-gflags + cp -pr python2/COPYING /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python2-gflags + cp -pr python2/COPYING /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python2-gflags + cp -pr python2/README /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python2-gflags + cp -pr python2/README /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python2-gflags + exit 0 + exit 0 Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.TFaX9T Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.TFaX9T + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + cd python-gflags-2.0 + cd python-gflags-2.0 + LICENSEDIR=/builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/licenses/python2-gflags + LICENSEDIR=/builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/licenses/python2-gflags + export LC_ALL=C + export LC_ALL=C + LC_ALL=C + LC_ALL=C + export LICENSEDIR + export LICENSEDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/licenses/python2-gflags + /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/licenses/python2-gflags + cp -pr python2/COPYING /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/licenses/python2-gflags + cp -pr python2/COPYING /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/licenses/python2-gflags + exit 0 + exit 0 Provides: python2-gflags = 2.0-17.el8 python2.7dist(python-gflags) = 2.0 python2dist(python-gflags) = 2.0 Provides: python2-gflags = 2.0-17.el8 python2.7dist(python-gflags) = 2.0 python2dist(python-gflags) = 2.0 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: /usr/bin/python2 python(abi) = 2.7 Requires: /usr/bin/python2 python(abi) = 2.7 Processing files: python3-gflags-2.0-17.el8.noarch Processing files: python3-gflags-2.0-17.el8.noarch Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.o4nYBd Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.o4nYBd + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + cd python-gflags-2.0 + cd python-gflags-2.0 + DOCDIR=/builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python3-gflags + DOCDIR=/builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python3-gflags + export LC_ALL=C + export LC_ALL=C + LC_ALL=C + LC_ALL=C + export DOCDIR + export DOCDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python3-gflags + /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python3-gflags + cp -pr python3/AUTHORS /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python3-gflags + cp -pr python3/AUTHORS /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python3-gflags + cp -pr python3/ChangeLog /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python3-gflags + cp -pr python3/ChangeLog /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python3-gflags + cp -pr python3/COPYING /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python3-gflags + cp -pr python3/COPYING /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python3-gflags + cp -pr python3/README /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python3-gflags + cp -pr python3/README /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/doc/python3-gflags + exit 0 + exit 0 Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.38WB5w Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.38WB5w + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + cd python-gflags-2.0 + cd python-gflags-2.0 + LICENSEDIR=/builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/licenses/python3-gflags + LICENSEDIR=/builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/licenses/python3-gflags + export LC_ALL=C + export LC_ALL=C + LC_ALL=C + LC_ALL=C + export LICENSEDIR + export LICENSEDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/licenses/python3-gflags + /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/licenses/python3-gflags + cp -pr python3/COPYING /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/licenses/python3-gflags + cp -pr python3/COPYING /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64/usr/share/licenses/python3-gflags + exit 0 + exit 0 Provides: python3-gflags = 2.0-17.el8 python3.6dist(python-gflags) = 2.0 python3dist(python-gflags) = 2.0 Provides: python3-gflags = 2.0-17.el8 python3.6dist(python-gflags) = 2.0 python3dist(python-gflags) = 2.0 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: /usr/bin/python3.6 python(abi) = 3.6 Requires: /usr/bin/python3.6 python(abi) = 3.6 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 Wrote: /builddir/build/RPMS/python2-gflags-2.0-17.el8.noarch.rpm Wrote: /builddir/build/RPMS/python2-gflags-2.0-17.el8.noarch.rpm Wrote: /builddir/build/RPMS/python3-gflags-2.0-17.el8.noarch.rpm Wrote: /builddir/build/RPMS/python3-gflags-2.0-17.el8.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.mf5VtU Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.mf5VtU + umask 022 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + cd python-gflags-2.0 + cd python-gflags-2.0 + /usr/bin/rm -rf /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 + /usr/bin/rm -rf /builddir/build/BUILDROOT/python-gflags-2.0-17.el8.x86_64 + exit 0 + exit 0 Child return code was: 0 Child return code was: 0