Alexander Pyhalov
2020-01-16 a58caa43e3024a4c78b0dcef40f4e2dab894e0ff
imf-selector: switch to Python 3.5
2 files modified
38 ■■■■■ changed files
components/inputmethod/imf-selector/Makefile 26 ●●●●● patch | view | raw | blame | history
components/inputmethod/imf-selector/src/src/imf-selector 12 ●●●● patch | view | raw | blame | history
components/inputmethod/imf-selector/Makefile
@@ -13,11 +13,13 @@
# Copyright 2015 Alexander Pyhalov
#
BUILD_BITS=64
include ../../../make-rules/shared-macros.mk
COMPONENT_NAME= imf-selector
COMPONENT_VERSION= 0.5.11
COMPONENT_REVISION= 2
COMPONENT_REVISION= 3
COMPONENT_SUMMARY= Input Method Framework startup
COMPONENT_SRC = src
COMPONENT_PROJECT_URL = http://www.openindiana.org
@@ -26,15 +28,16 @@
COMPONENT_LICENSE = CDDL
COMPONENT_CLASSIFICATION = System/Internationalization
include $(WS_TOP)/make-rules/configure.mk
include $(WS_TOP)/make-rules/ips.mk
TEST_TARGET = $(NO_TESTS)
PYTHON_VERSION = 3.5
include $(WS_MAKE_RULES)/common.mk
clobber: clean
clobber:: clean
$(SOURCE_DIR)/.prep:    Makefile
    $(TOUCH) $@
PATH=/usr/gnu/bin:/usr/bin
PATH=$(PATH.gnu)
# Missing files in build dir for configure without this.
COMPONENT_PRE_CONFIGURE_ACTION =        (cp -a $(SOURCE_DIR)/* $(@D))
@@ -49,14 +52,7 @@
    $(RM) $(SOURCE_DIR)/.prep
    $(RM) -rf $(BUILD_DIR)
download:
build: $(BUILD_32)
install: $(INSTALL_32)
test: $(NO_TESTS)
# Auto-generated dependencies
REQUIRED_PACKAGES += library/python/pygobject-3-35
REQUIRED_PACKAGES += runtime/python-35
REQUIRED_PACKAGES += SUNWcs
REQUIRED_PACKAGES += library/python/pygobject-3-27
REQUIRED_PACKAGES += runtime/python-27
components/inputmethod/imf-selector/src/src/imf-selector
@@ -1,4 +1,4 @@
#!/usr/bin/python2.7
#!/usr/bin/python3.5
#
# CDDL HEADER START
#
@@ -30,7 +30,7 @@
import sys
import getopt
import time
import commands
import subprocess
import locale
from os import path
@@ -106,7 +106,7 @@
            self.__enable_im()
    def __launch_help(self, widget=None, data=None):
     os.spawnv(os.P_NOWAIT, "/usr/bin/yelp", ["/usr/bin/yelp", "gnome-help:imf-selector"])
            os.spawnv(os.P_NOWAIT, "/usr/bin/yelp", ["/usr/bin/yelp", "gnome-help:imf-selector"])
    def __default(self, widget=None, data=None):
        im = self.__exec_script('-default')
@@ -155,7 +155,7 @@
        cmd = self.IMSCRIPT + ' ' + opt + ' ' + arg
        try:
            if(os.access(self.IMSCRIPT, os.X_OK)):
                (status, out) = commands.getstatusoutput(cmd)
                (status, out) = subprocess.getstatusoutput(cmd)
                if(status != 0):
                    msg = _("Following error occured :\n\n") + out
                    self.__show_err_dlg(msg)
@@ -252,8 +252,8 @@
if __name__ == "__main__":
    try:
        opts, args = getopt.getopt(sys.argv[1:], "p:", ["prior="])
    except getopt.error, msg:
        print "%s" %(msg)
    except getopt.error as msg:
        print("%s" %(msg))
        sys.exit(2)
    setup = IMSelector()