instead of L407-415, you could use `find_on_path` like so:
```
dist = [d for d in pkg_resources.find_on_path(None, source_dir)][0]
```