This lets you use resource_stream in enter and exit, at least.
Fun note: turns out the python in-place config doesn't actually include the vendored pkg_resources in the PYTHONPATH. I didn't fix that in this change. It might be worth considering looking into in-place pex running instead of re-implementing pex, e.g. - in tp/py/.../pex/bin/pex.py:
log('Running PEX file at %s with args %s' % (pex_builder.path(), args), v=options.verbosity)
pex = PEX(pex_builder.path(), interpreter=pex_builder.interpreter)
return pex.run(args=list(args))
Separately, as part of (a hope!) to import the new pex, I've renamed pex.py to make_pex.py to fix the name collision.