openbsd-ports/x11/wxglade/patches/patch-common_py
jca a7ae1d0ec1 Import wxglade-0.7.0, from maintainer Daniel Winters.
Feedback from landry@ and sthen@; ok sthen@

pkg/DESCR:

wxGlade is a GUI designer written in Python with the popular GUI
toolkit wxPython, that helps you create wxWidgets/wxPython user
interfaces. At the moment it can generate Python, C++, Perl, Lisp and
XRC (wxWidgets' XML resources) code.

As you can guess by the name, its model is Glade, the famous
GTK+/GNOME GUI builder, with which wxGlade shares the philosophy and
the look & feel (but not a line of code).

It is not (and will never be) a full featured IDE, but simply a
"designer": the generated code does nothing apart from displaying the
created widgets.
2015-10-13 16:58:07 +00:00

29 lines
839 B
Plaintext

$OpenBSD: patch-common_py,v 1.1.1.1 2015/10/13 16:58:07 jca Exp $
Backport upstream fix for missing ~/.wxglade/ directory.
https://bitbucket.org/agriggio/wxglade/commits/4c3c49e4cf61a1d8127a74a396016ffa4fbaa97b?at=default
--- common.py.orig Fri Oct 9 16:03:04 2015
+++ common.py Fri Oct 9 16:06:20 2015
@@ -8,6 +8,7 @@ Global variables
import ConfigParser
import logging
+import os
import os.path
import sys
import zipfile
@@ -1229,6 +1230,11 @@ def init_paths():
config.log_file = os.path.join(
config.appdata_path, 'wxglade.log'
)
+
+ # create missing application data directory, otherwise log initialisation
+ # will failed with an IOError "No such file or directory"
+ if not os.path.isdir(config.appdata_path):
+ os.makedirs(config.appdata_path, 0700)
def init_preferences():