diff --git a/faenza-icon-theme.changes b/faenza-icon-theme.changes index b732b69..f9c3508 100644 --- a/faenza-icon-theme.changes +++ b/faenza-icon-theme.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Dec 4 09:25:53 UTC 2020 - Dominique Leuenberger + +- Use python3 to perform installation: + + Replace python BuildRequires with python3-base. + + Change syntax of faenza-install to be python3 compatible. + ------------------------------------------------------------------- Fri May 10 09:45:06 UTC 2013 - rmilasan@suse.com diff --git a/faenza-icon-theme.spec b/faenza-icon-theme.spec index ea9403c..f0a741d 100644 --- a/faenza-icon-theme.spec +++ b/faenza-icon-theme.spec @@ -2,7 +2,7 @@ # # spec file for package faenza-icon-theme # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2011 PAscal Bleser # Copyright (c) 2010 Nelson Marques # @@ -15,7 +15,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -23,16 +23,16 @@ Name: faenza-icon-theme Version: 1.3 Release: 0 Summary: Faenza Icon Theme -License: GPL-3.0+ +License: GPL-3.0-or-later Group: System/GUI/GNOME -Url: http://tiheum.deviantart.com/art/Faenza-Icons-173323228 +URL: http://tiheum.deviantart.com/art/Faenza-Icons-173323228 ## http://www.deviantart.com/download/173323228/faenza_icons_by_tiheum-d2v6x24.zip Source0: https://faenza-icon-theme.googlecode.com/files/%{name}_%{version}.zip Source1: http://gnome-look.org/CONTENT/content-files/132681-Faenza-Mint.tar.gz # script to rebrand and install stuff... Source2: faenza-install BuildRequires: fdupes -BuildRequires: python +BuildRequires: python3-base %if 0%{?suse_version} # For all the icon themes macros BuildRequires: hicolor-icon-theme @@ -122,7 +122,7 @@ done %build %install -python %{S:2} --install %{buildroot}%{_datadir}/icons/ +python3 %{S:2} --install %{buildroot}%{_datadir}/icons/ %fdupes %{buildroot}%{_datadir}/icons find %{buildroot}%{_datadir}/icons -type f -exec chmod 0644 {} \; diff --git a/faenza-install b/faenza-install index 4848e52..1ffc350 100644 --- a/faenza-install +++ b/faenza-install @@ -28,10 +28,10 @@ class Faenza(): print header ''' def header(self): - print '\n faenza-install -- version %s \n' % VERSION - print ' This script performs minimum rebranding and installs the' - print ' faenza-icon-theme in INSTALL_DIR (sys.argv[1]). For help' - print ' run the following this script with "-h" or "--help". \n' + print('\n faenza-install -- version %s \n' % VERSION) + print(' This script performs minimum rebranding and installs the') + print(' faenza-icon-theme in INSTALL_DIR (sys.argv[1]). For help') + print(' run the following this script with "-h" or "--help". \n') ''' @@ -54,9 +54,9 @@ class Faenza(): if os.path.exists(target): os.unlink(target) else: - print ' - file not found: %s' % target - except Exception, errno: - print errno + print(' - file not found: %s' % target) + except Exception as errno: + print(errno) sys.exit(1) return 0 @@ -69,22 +69,22 @@ class Faenza(): self.scan('start-here') self.scan('distributor-logo') if not icons: - print '\n - NO icons found.. Exiting!\n' + print('\n - NO icons found.. Exiting!\n') sys.exit(1) else: for icon in icons: dirname, myfile = os.path.split(icon) filename, myext = os.path.splitext(myfile) - print ' - %s' % icon + print(' - %s' % icon) try: self.delete(icon) - print ' + delete file: %s' % icon - except Exception, errno: - print errno + print(' + delete file: %s' % icon) + except Exception as errno: + print(errno) sys.exit(1) os.chdir(dirname) os.system('ln -s %s %s' % ( filename + '-' + dist + myext, myfile)) - print ' + file rebranded to: %s' % ( filename + '-' + distribution + myext ) + print(' + file rebranded to: %s' % ( filename + '-' + distribution + myext )) os.chdir(base) return 0 @@ -94,15 +94,15 @@ class Faenza(): install Faenza themes on sys.argv[1] ''' def install(self, target): - print ' - Installation \n' + print(' - Installation \n') for variant in variants: fs_dir = os.path.join(target, variant) if not os.path.isdir(fs_dir): try: shutil.copytree(variant, fs_dir) - print ' + file installed: %s' % fs_dir - except Exception, err: - print err + print(' + file installed: %s' % fs_dir) + except Exception as err: + print(err) return 1 return 0 @@ -143,10 +143,10 @@ def main(): if option.version: - print '\n faenza-install -- version %s \n' % VERSION - print ' This script performs minimum rebranding and installs the' - print ' faenza-icon-theme in INSTALL_DIR (sys.argv[1]). For help' - print ' run the following this script with "-h" or "--help". \n' + print('\n faenza-install -- version %s \n' % VERSION) + print(' This script performs minimum rebranding and installs the') + print(' faenza-icon-theme in INSTALL_DIR (sys.argv[1]). For help') + print(' run the following this script with "-h" or "--help". \n') sys.exit(0) global dist