packaging: Add the project directory to sys.path to support local setup hooks.

Original patch by Vinay Sajip on #11637.
3 files changed