Revert "Revert "add local package support""

This reverts commit 0fb6cca56b5b045ab6fd78c1c505914e327ebc5e.
enable local package support