import os
import sys

try:  # ST3
    from .Lib.sublime_lib.path import get_package_name, get_package_path

    PLUGIN_NAME = get_package_name()
    libpath = os.path.join(get_package_path(), "Lib")
except ValueError:  # ST2
    # For some reason the import does only work when RELOADING the plugin, not
    # when ST is loading it initially.

    # from lib.sublime_lib.path import get_package_name, get_package_path
    path = os.path.normpath(os.getcwdu())
    PLUGIN_NAME = os.path.basename(path)
    libpath = os.path.join(path, "Lib")


def add(path):
    if not path in sys.path:
        sys.path.append(path)
        print("[%s] Added %s to sys.path." % (PLUGIN_NAME, path))

# Make sublime_lib (and more) available for all packages.
add(libpath)
# Differentiate between Python 2 and Python 3 packages (split by folder)
add(os.path.join(libpath, "_py%d" % sys.version_info[0]))

@@ -85,36 +85,18 @@
 age_name
-, get_package_path
 %0D%0A
+
 %0D%0A    PL
@@ -127,27 +127,24 @@
 name()%0D%0A    
-lib
 path = os.pa
@@ -150,31 +150,58 @@
 ath.
-join(get_package_path()
+dirname(__file__)%0D%0A    libpath = os.path.join(path
 , %22L

Make imports work when in .sublime-package