[meld] build_helpers: Use get_option_dict to get prefix value



commit f75303ea4934483c7b3cd3f5ef54b4de6157fd77
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Sun May 21 03:34:26 2017 +0800

    build_helpers: Use get_option_dict to get prefix value
    
    The build_py class was added to support installing meld into an
    alternative prefix, which is required in a jhbuild environment.
    However, command_obj doesn't seem to work with current python3 version,
    Replacing it with get_option_dict fixes the problem.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782887

 meld/build_helpers.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meld/build_helpers.py b/meld/build_helpers.py
index a75204a..17f421a 100644
--- a/meld/build_helpers.py
+++ b/meld/build_helpers.py
@@ -336,8 +336,8 @@ class build_py(distutils.command.build_py.build_py):
                 contents = f.read()
 
             try:
-                iobj = self.distribution.command_obj['install']
-                prefix = iobj.prefix
+                options = self.distribution.get_option_dict('install')
+                prefix = options['prefix'][1]
             except KeyError as e:
                 print (e)
                 prefix = sys.prefix


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]