Open brianddk opened 4 years ago
There seems to be some interesting patches listed in mingw-w64-python-pywin32, but since it never released, its hard to tell how stale these patches are.
These are stale, yes. My patches are not included in the master for MINGW-packages yet. But you can find them here: https://github.com/joankaradimov/MINGW-packages/tree/pywin32-updates/mingw-w64-python-pywin32
Doing the obvious stuff yields obvious errors
You'll need to do a bunch more. See the prepare
and build
functions in pacman's PKGBUILD. And unfortunately -- even after that the build that's produced will not work on Python 3.8 -- most likely because of https://github.com/mhammond/pywin32/issues/1327.
Thoughts?
I'm interested in writing instruction and getting CI builds working for mingw. But I'd say it's too early now.
This is still a WIP. You can see the current progress here: https://github.com/msys2/MINGW-packages/pull/5615. It turned out to be quite the task. It included a bunch of patches in mingw-w64
. A few more patches would need to be submitted in mingw to get mapi
and propsys
to compile. I'll also need to figure out a nicer way to distribute my SEH code (I might have some ideas). And some more stuff would need to be polished and brought in as pull requests here.
TL;DR It's too early. But if you're willing to experiment - you could get Python 2.7 to work by looking at this.
even after that the build that's produced will not work on Python 3.8 -- most likely because of #1327.
I'd like to understand that issue better, but it's a commonly reported problem when there are duplicate DLLs etc installed (eg, from another or different installation). 3.8 installs seem to work OK on a clean system (although obviously not any mingw specific stuff).
It's too early. But if you're willing to experiment - you could get Python 2.7 to work by looking at this.
I'd advise against putting too much effort into anything 2.7 specific - I'm hoping to land https://github.com/mhammond/pywin32/pull/1510 in the next week or 2, which will remove all 2.x support forever.
That branch also has better CI integration which should make some things easier. Let me know if I can help further.
Hi Mark and all..
I had successfully built pywin32 on mingw-w64. Using Python v3.5.2 (x64) & MinGW-w64 5.3.0 (mingw-build).
Here is the build log:
pywin32-220-3.5-w64-5.3.0-build.txt
Install log:
pywin32-220-3.5-w64-5.3.0-install.txt
Some changes are required to support UNICODE for the includes files from Win SDK 7.1 & Exchange.
I also had to use libs from winddk 7.1 in order to compile successfully: ADSIid.Lib Bits.Lib Htmlhelp.Lib MsXml2.Lib NtQuery.Lib propsys.lib RunTmChk.lib Uuid.lib windowscodecs.lib
Here is the patch:
Thanks - but that's a massive patch, and if it was against build 220, is almost certainly out of date. Any chance of a pull request?
嗨,马克和所有..
我已经在 mingw-w64 上成功构建了 pywin32。使用 Python v3.5.2 (x64) 和 MinGW-w64 5.3.0 (mingw-build)。
这是构建日志:
pywin32-220-3.5-w64-5.3.0-build.txt
安装日志:
pywin32-220-3.5-w64-5.3.0-install.txt
Win SDK 7.1 和 Exchange 中的包含文件需要进行一些更改才能支持 UNICODE。
我还必须使用 winddk 7.1 中的库才能成功编译: ADSIid.Lib Bits.Lib Htmlhelp.Lib MsXml2.Lib NtQuery.Lib propsys.lib RunTmChk.lib Uuid.lib windowscodecs.lib
这是补丁:
could you provide the mingw_x64 pywin32 .whl file?
could you provide the mingw_x64 pywin32 .whl file?
Not until it actually builds.
wget https://github.com/mhammond/pywin32/archive/b228.tar.gz tar -xzvf b224.tar.gz cd pywin32-b224 python setup.py install
Note to readers that python setup.py
and the use of setup.py as a command line tool are deprecated. pywin32 itself needs to move away from it. #2208
There are notes in CHANGES.txt discussing work by @joankaradimov to make pywin32 buildable under MingGW/msys2
but there are no relevant instructions in build_env.md as to how to build it.
There seems to be some interesting patches listed in mingw-w64-python-pywin32, but since it never released, its hard to tell how stale these patches are.
Doing the obvious stuff yields obvious errors
yields
Thoughts?