Alessandro Pilotti
2015-09-06 16:19:07 UTC
Hi all,
Iâm getting some Python based projects to work on Microsoft Nano Server, in particular OpenStack Hyper-V / Windows componens and Cloudbase-Init / Cloud-Init for Windows.
Python 3.4 x64 and Python 2.7 x64 currently work fine on Nano (Python 2.7 needs to be compiled targetting VS 2010 or above), but pywin32 required some work as Nano supports a significantly reduced API surface, although proxies called reverse forwarders are included to simplify porting of pre-existing applications.
Failing to remove unavailable exports results in DLL loading failures (C000142 / C0000135 errors), as youâd expect.
Hereâs a fork of the pywin32 repository with Nano support, which works on the publicly availbale Nano server builds (e.g. Windows Server TP3). In particular here's the relevant patch:
https://bitbucket.org/cloudbase/pywin32/commits/cae1b44e00195847312a4521ae6c5cca3bb5b195
The patch is quite coarse grained and is meant to provide a fully working PoC and not meant for merging at the current stage, as some cleanup and tests are needed, but it should give though an idea of the scope of work.
Do you guys have already a plan around Nano support for pywin32?
Thanks!
Alessandro
P.S.: The WMI module required a patch as well to work on Nano, due to the lack of COM monikers support:
https://github.com/cloudbase/wmi/commit/e452f464f6c3c46d6ecbc973034738491996561a
Iâm getting some Python based projects to work on Microsoft Nano Server, in particular OpenStack Hyper-V / Windows componens and Cloudbase-Init / Cloud-Init for Windows.
Python 3.4 x64 and Python 2.7 x64 currently work fine on Nano (Python 2.7 needs to be compiled targetting VS 2010 or above), but pywin32 required some work as Nano supports a significantly reduced API surface, although proxies called reverse forwarders are included to simplify porting of pre-existing applications.
Failing to remove unavailable exports results in DLL loading failures (C000142 / C0000135 errors), as youâd expect.
Hereâs a fork of the pywin32 repository with Nano support, which works on the publicly availbale Nano server builds (e.g. Windows Server TP3). In particular here's the relevant patch:
https://bitbucket.org/cloudbase/pywin32/commits/cae1b44e00195847312a4521ae6c5cca3bb5b195
The patch is quite coarse grained and is meant to provide a fully working PoC and not meant for merging at the current stage, as some cleanup and tests are needed, but it should give though an idea of the scope of work.
Do you guys have already a plan around Nano support for pywin32?
Thanks!
Alessandro
P.S.: The WMI module required a patch as well to work on Nano, due to the lack of COM monikers support:
https://github.com/cloudbase/wmi/commit/e452f464f6c3c46d6ecbc973034738491996561a