def unlink(self, path, pkg):
        """ Unlink the package in the current directory.
        """
        #: Check if a custom unlinker exists to handle unlinking this package
        for ep in pkg_resources.iter_entry_points(
                group="enaml_native_unlinker"):
            if ep.name.replace("-", '_') == pkg.replace("-", '_'):
                unlinker = ep.load()
                print("Custom unlinker {} found for '{}'. "
                      "Unlinking...".format(unlinker, pkg))
                if unlinker(self.ctx, path):
                    return

        if exists(join(path, 'android', pkg, 'build.gradle')):
            print("[Android] unlinking {}".format(pkg))
            self.unlink_android(path, pkg)

        for target in ['iphoneos', 'iphonesimulator']:
            if exists(join(path, target, pkg, 'Podfile')):
                print("[iOS] unlinking {}".format(pkg))
                self.unlink_ios(path, pkg)
def unlink ( self , path , pkg ) : for ep in pkg_resources . iter_entry_points ( group = "enaml_native_unlinker" ) : if ep . name . replace ( "-" , '_' ) == pkg . replace ( "-" , '_' ) : unlinker = ep . load ( ) print ( "Custom unlinker {} found for '{}'. " "Unlinking..." . format ( unlinker , pkg ) ) if unlinker ( self . ctx , path ) : return if exists ( join ( path , 'android' , pkg , 'build.gradle' ) ) : print ( "[Android] unlinking {}" . format ( pkg ) ) self . unlink_android ( path , pkg ) for target in [ 'iphoneos' , 'iphonesimulator' ] : if exists ( join ( path , target , pkg , 'Podfile' ) ) : print ( "[iOS] unlinking {}" . format ( pkg ) ) self . unlink_ios ( path , pkg )
Unlink the package in the current directory.