diff --git a/.devassist09-devassistant.metadata b/.devassist09-devassistant.metadata index c5cf09b..34bada9 100644 --- a/.devassist09-devassistant.metadata +++ b/.devassist09-devassistant.metadata @@ -1 +1 @@ -a05e81e8029adedc17ca16d4e75a409e12ec09fc SOURCES/devassistant-0.9.1.tar.gz +feee5f8463652cc3d364bfab0176160ae633a728 SOURCES/devassistant-0.9.3.tar.gz diff --git a/.gitignore b/.gitignore index be437fc..d943528 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/devassistant-0.9.1.tar.gz +SOURCES/devassistant-0.9.3.tar.gz diff --git a/SOURCES/devassistant-0.9.0-alter-paths-downstream.patch b/SOURCES/devassistant-0.9.0-alter-paths-downstream.patch index e3c0ad7..d96590b 100644 --- a/SOURCES/devassistant-0.9.0-alter-paths-downstream.patch +++ b/SOURCES/devassistant-0.9.0-alter-paths-downstream.patch @@ -1,13 +1,13 @@ --- devassistant/settings.py.orig 2014-06-20 10:42:50.000000000 +0200 +++ devassistant/settings.py 2014-06-23 14:21:15.671789766 +0200 -@@ -30,8 +30,8 @@ - CACHE_FILE = os.path.expanduser('~/.devassistant/.cache.yaml') - CONFIG_FILE = os.path.expanduser('~/.devassistant/.config') - LOG_FILE = os.path.expanduser('~/.devassistant/lastrun.log') +@@ -37,8 +37,8 @@ + # load assistants, the relative path would point in an unwanted location + # - command runners should be allowed to rely on this (e.g. if we pass a file from files + # section to Jinja2Runner, we need to make sure it's fullpath) -DATA_DIRECTORIES = [os.path.join(os.path.dirname(__file__), 'data'), - '/usr/local/share/devassistant', +DATA_DIRECTORIES = ['_DATADIR_DEVASSISTANT', + '_DATADIR_LOCAL_DEVASSISTANT', os.path.expanduser('~/.devassistant')] if 'DEVASSISTANT_PATH' in os.environ: - DATA_DIRECTORIES = os.environ['DEVASSISTANT_PATH'].split(':') + DATA_DIRECTORIES + DATA_DIRECTORIES = [os.path.abspath(p) for p in os.environ['DEVASSISTANT_PATH'].split(':')] +\ diff --git a/SOURCES/devassistant-0.9.0-fix-directory-not-writable.patch b/SOURCES/devassistant-0.9.0-fix-directory-not-writable.patch new file mode 100644 index 0000000..1d0c08f --- /dev/null +++ b/SOURCES/devassistant-0.9.0-fix-directory-not-writable.patch @@ -0,0 +1,27 @@ +From cb732f42e697e5e89dfd947c844ca911d8260a4a Mon Sep 17 00:00:00 2001 +From: Tomas Radej +Date: Thu, 19 Feb 2015 16:56:05 +0100 +Subject: [PATCH] Fix directory not writable + +--- + devassistant/command_runners.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/devassistant/command_runners.py b/devassistant/command_runners.py +index a36c4e9..8bbe124 100644 +--- a/devassistant/command_runners.py ++++ b/devassistant/command_runners.py +@@ -1194,8 +1194,8 @@ class SetupProjectDirCommandRunner(CommandRunner): + os.makedirs(topdir_fullpath) + + except OSError as e: +- msg = 'Failed to create directory {0}: {1}'.format(args['from'], e.message) +- raise CommandException(msg) ++ msg = 'Failed to create directory {0}: {1}'.format(args['from'], e.strerror) ++ raise exceptions.CommandException(msg) + + # if contdir == '', then return current dir ('.') + c.kwargs[args['contdir_var']] = contdir or '.' +-- +2.1.0 + diff --git a/SOURCES/devassistant-0.9.0-fix-old-six.patch b/SOURCES/devassistant-0.9.0-fix-old-six.patch new file mode 100644 index 0000000..d817363 --- /dev/null +++ b/SOURCES/devassistant-0.9.0-fix-old-six.patch @@ -0,0 +1,48 @@ +From 3b6b401491e315059cf486c3f90d0ddab2c61261 Mon Sep 17 00:00:00 2001 +From: Tomas Radej +Date: Thu, 19 Feb 2015 15:19:20 +0100 +Subject: [PATCH] Fixed old six + +--- + devassistant/command_runners.py | 6 +++--- + devassistant/logger.py | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/devassistant/command_runners.py b/devassistant/command_runners.py +index 6433f2a..a36c4e9 100644 +--- a/devassistant/command_runners.py ++++ b/devassistant/command_runners.py +@@ -1109,14 +1109,14 @@ class NormalizeCommandRunner(CommandRunner): + raise exceptions.CommandException('"normalize" expects string input, got {0}'.\ + format(to_norm)) + +- if six.PY2 and isinstance(to_norm, str): ++ if not six.PY3 and isinstance(to_norm, str): + to_norm = to_norm.decode('utf8') + normalized = unicodedata.normalize('NFKD', to_norm) +- if six.PY2: ++ if not six.PY3: + normalized = normalized.encode('ascii', 'ignore') + normalized = normalized.lstrip('0123456789') + badchars = '-+\\|()[]{}<>,./:\'" \t;`!@#$%^&*' +- if six.PY2: ++ if not six.PY3: + tt = string.maketrans(badchars, '_' * len(badchars)) + else: + tt = str.maketrans(badchars, '_' * len(badchars)) +diff --git a/devassistant/logger.py b/devassistant/logger.py +index da09eab..6f8f0b4 100644 +--- a/devassistant/logger.py ++++ b/devassistant/logger.py +@@ -30,7 +30,7 @@ class DevassistantClFormatter(logging.Formatter): + settings.LOG_FORMATS_MAP['log_cmd'] + + record_vars = vars(record) +- if six.PY2: ++ if not six.PY3: + if isinstance(record_vars['msg'], BaseException): + record_vars['msg'] = record_vars['msg'].message + if isinstance(record_vars['msg'], str): +-- +2.1.0 + diff --git a/SOURCES/devassistant-0.9.0-remove-creator-window.patch b/SOURCES/devassistant-0.9.0-remove-creator-window.patch deleted file mode 100644 index 4c746cd..0000000 --- a/SOURCES/devassistant-0.9.0-remove-creator-window.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- devassistant/gui/__init__.py.orig 2014-06-23 14:50:40.994456833 +0200 -+++ devassistant/gui/__init__.py 2014-06-23 14:50:48.954450792 +0200 -@@ -26,19 +26,3 @@ - sys.exit(1) - from devassistant.gui import main_window - main_window.MainWindow() -- -- --def run_yaml_gui(): -- """ -- Function for running DevAssistant YAML Creator GUI -- """ -- try: -- from gi.repository import Gtk -- except RuntimeError as e: -- sys.stderr.write(GUI_MESSAGE) -- sys.stderr.write("%s: %r" % (e.__class__.__name__, str(e))) -- sys.stderr.flush() -- sys.exit(1) -- -- from devassistant.gui import creator_window -- creator_window.CreatorWindow() diff --git a/SPECS/devassistant.spec b/SPECS/devassistant.spec index 3899185..2d0cc1a 100644 --- a/SPECS/devassistant.spec +++ b/SPECS/devassistant.spec @@ -6,8 +6,8 @@ #%%global prerel b1 Name: %{?scl_prefix}devassistant -Version: 0.9.1 -Release: %{?prerel:0.}1%{?prerel:.%{prerel}}%{?dist} +Version: 0.9.3 +Release: %{?prerel:0.}3%{?prerel:.%{prerel}}%{?dist} Summary: DevAssistant - Making life easier for developers License: GPLv2+ and CC-BY-SA @@ -15,8 +15,8 @@ URL: https://github.com/bkabrda/devassistant Source0: https://pypi.python.org/packages/source/d/%{pkg_name}/%{pkg_name}-%{version}%{?prerel}.tar.gz Patch0: %{pkg_name}-0.9.0-alter-paths-downstream.patch Patch2: %{pkg_name}-0.9.0-dont-require-pygithub.patch -# Remove currently not finished functionality -Patch4: devassistant-0.9.0-remove-creator-window.patch +Patch3: %{pkg_name}-0.9.0-fix-old-six.patch +Patch4: %{pkg_name}-0.9.0-fix-directory-not-writable.patch BuildArch: noarch BuildRequires: python-devel @@ -60,7 +60,11 @@ rm -rf %{pkg_name}/data # don't require PyGithub in DTS version %patch2 -p0 -%patch4 -p0 +# fix usage of six.PY2 for old six versions +%patch3 -p1 + +# fix raising an exception when directory is not writable +%patch4 -p1 %build %{?scl:scl enable %{scl} - << \EOF} @@ -101,9 +105,6 @@ sed -i 's|_DATADIR_DEVASSISTANT|%{_datadir}/%{pkg_name}|' devassistant/settings. sed -i 's|_DATADIR_LOCAL_DEVASSISTANT|%{_prefix}/local/share/%{pkg_name}|' devassistant/settings.py popd -# remove files containing unsupported functionality; they'll not be part of final upstream release -rm %{buildroot}%{python_sitelib}/%{pkg_name}/gui/{creator_window.py*,devel-yaml.glade} - %files %doc README.rst LICENSE %{_bindir}/%{shortname} @@ -122,6 +123,17 @@ rm %{buildroot}%{python_sitelib}/%{pkg_name}/gui/{creator_window.py*,devel-yaml. %doc docs/_build/html %changelog +* Wed Feb 18 2015 Tomas Radej - 0.9.3-3 +- Fix usage of six.PY2 for older six versions +Resolves: rhbz#1193936 + +* Tue Jan 20 2015 Slavek Kabrda - 0.9.3-2 +- Make patch 0 (alter paths downstream) apply cleanly. + +* Thu Jan 08 2015 Slavek Kabrda - 0.9.3-1 +- Update to 0.9.3 final +Resolves: rhbz#1167913 + * Mon Jun 23 2014 Bohuslav Kabrda - 0.9.1-1 - Update to 0.9.1 final