HomePhabricator

help: get helptext/ data from `resources` module if available

Authored by martinvonz.

Description

help: get helptext/ data from resources module if available

For PyOxidizer, we need to read configs using the resources
module. This patch makes it so we use that module if available
(i.e. Python >= 3.7). It does that by adding a new open_resource()
function to our resourceutil module.

Tested by running $PYTHON ./hg help pager for each $PYTHON in
{python2, python3.6, python3.7}.

Differential Revision: https://phab.mercurial-scm.org/D7622