mirror of
https://github.com/facebook/sapling.git
synced 2024-10-17 04:08:01 +03:00
50ddbd96dd
Summary: This is needed for the `py2exe`-like loading of the the python stdlib and mercurial files. The `zipimport` per se works out of the box in Python. The problem is loading native extensions. Since some of them are parts of packages, such as `mercurial.cext.osutil`, and `mercurial/cext/` folder structure does not exist in the embedded case, we're just doing what `py2exe` does: renaming every native extension file to include the full package path, e.g. `mercurial.cext.osutil.pyd` and tweaking the loader to know to try such files. NB: I want to rename `hgdemandimport` to `hgimport` later, since now there are more responsibilities for this package. We can probably also just merge it with `mercurial`, since we don't care about `python3` Reviewed By: quark-zju Differential Revision: D9919806 fbshipit-source-id: 216ae904760311003e7171cb6fbe0bbc4b1abe2b |
||
---|---|---|
.. | ||
__init__.py | ||
demandimportpy2.py | ||
demandimportpy3.py | ||
embeddedimport.py |