Re: [python-win32] Using pip to install pywin32
Pywin32 is mostly written in C, and has lots of dependencies and weird build requirements. In order to compile it, you must have the same C compiler that your release of Python was built with. For older Python versions (like 2.7) that compiler is obsolete and hard to find, so installs from source are pretty nearly impossible. Would a binary wheel be able to do all of the crazy set up that the Windows installer does? The project is open source, and patches are happily accepted. On Thu, Feb 19, 2015 at 11:39 PM, Kevin Horn kevin.h...@gmail.com wrote: check out this bug: http://sourceforge.net/p/pywin32/bugs/669/ There's been some interest, but the pywin32 developers themselves don't seem to have gotten involved. I'm not sure why. It would be really nice to have pywin32 be pip-installable. On Thu, Feb 19, 2015 at 4:23 AM, Chris Angelico ros...@gmail.com wrote: Has anyone successfully pip installed the pywin32 package? I'm having some trouble with it at the moment. In theory, it should be easier to instruct people to type pip install pywin32 than go to the sourceforge download page, pick the right installer, and run it; but the installer is currently failing. Full log is available if people want it, but what I'm seeing in it is a number of lines like: Analyzing links from page http://sourceforge.net/projects/pywin32/files/pywin32/ It never gets to the point of searching the build-specific pages, eg: http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/ Is there a way to tell pip how to find the file? All advice gratefully received! ChrisA ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32 -- -- Kevin Horn ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32 ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32
[python-win32] Instructions for building and installing Python 2.7 on Windows with VS 2013 or newer
Hi, I've successfully used the solution in the PCBuild directory to build CPython. However, now I have a binary and collection of .pyd files that aren't really a coherent installation. How do I do the equivalent of a make install step on Windows? My ultimate goal is to get a directory that looks like the C:\Python27 directory produced by running the official MSI download. I suspect the easiest way to achieve this is to build such an MSI and then run it. That's totally fine with me. I've done a fair amount of searching, but I've found results like the following which just have scripts that manually copy files into place in a way that sort of looks like an official installation. I'd like to do things the canonical way, if possible. I haven't been able to find this anywhere in docs.python.org, but maybe I'm blind. http://docs.python-guide.org/en/latest/starting/install/win/ Thanks! Reid ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32
Re: [python-win32] extension modules and msvc version
On Sat, Feb 21, 2015 at 4:18 AM, Zachary Turner ztur...@google.com wrote: Is it completely out of the question to change the way extension modules and python talk to each other? I don't know anything about Python implementation internals, but is something like this possible? I've no idea, my previous post pretty much exhausted my entire knowledge of the building of Python extensions for Windows :) But that sounds like a great topic for python-ideas or python-dev... and a PEP, and a lengthy period of bikeshedding, and lots of people telling you it isn't possible, and lots of other people telling you it's easy... Have fun with it! ChrisA ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32
Re: [python-win32] Using pip to install pywin32
On Fri, Feb 20, 2015 at 8:07 AM, Vernon D. Cole vernondc...@gmail.com wrote: Pywin32 is mostly written in C, and has lots of dependencies and weird build requirements. In order to compile it, you must have the same C compiler that your release of Python was built with. For older Python versions (like 2.7) that compiler is obsolete and hard to find, so installs from source are pretty nearly impossible. Microsoft provides a compiler package for Python 2.7 specifically for creating binary wheels (and other binary distros): http://www.microsoft.com/en-us/download/details.aspx?id=44266 Would a binary wheel be able to do all of the crazy set up that the Windows installer does? No it wouldn't, but a lot of the postinstall stuff isn't necessary for many uses of pywin32. It's probably still worthwhile to package it as a wheel for those use cases. At least it's useful enough that there's an alternate distribution called pypiwin32: https://pypi.python.org/pypi/pypiwin32 The project is open source, and patches are happily accepted. According to the bug I referenced above, the only thing necessary to get most functionality working is a tweak to the path files. Also according to the same bug, it looks as though those involved couldn't figure out where to send patches. Where should patches/contributions be sent in order to get the attention of those who can merge them? On Thu, Feb 19, 2015 at 11:39 PM, Kevin Horn kevin.h...@gmail.com wrote: check out this bug: http://sourceforge.net/p/pywin32/bugs/669/ There's been some interest, but the pywin32 developers themselves don't seem to have gotten involved. I'm not sure why. It would be really nice to have pywin32 be pip-installable. On Thu, Feb 19, 2015 at 4:23 AM, Chris Angelico ros...@gmail.com wrote: Has anyone successfully pip installed the pywin32 package? I'm having some trouble with it at the moment. In theory, it should be easier to instruct people to type pip install pywin32 than go to the sourceforge download page, pick the right installer, and run it; but the installer is currently failing. Full log is available if people want it, but what I'm seeing in it is a number of lines like: Analyzing links from page http://sourceforge.net/projects/pywin32/files/pywin32/ It never gets to the point of searching the build-specific pages, eg: http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/ Is there a way to tell pip how to find the file? All advice gratefully received! ChrisA ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32 -- -- Kevin Horn ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32 -- -- Kevin Horn ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32
Re: [python-win32] Using pip to install pywin32
I don't think pip can run this script (it even needs admin privs!). Is there a reason it couldn't run a script that presents a UAC prompt to elevate the process? Something like this: https://gist.github.com/Preston-Landers/267391562bc96959eb41 I guess for unattended installs you could just elevate the process beforehand. -Preston On Fri, Feb 20, 2015 at 9:24 AM, Thomas Heller thel...@ctypes.org wrote: Am 20.02.2015 um 15:07 schrieb Vernon D. Cole: Pywin32 is mostly written in C, and has lots of dependencies and weird build requirements. In order to compile it, you must have the same C compiler that your release of Python was built with. For older Python versions (like 2.7) that compiler is obsolete and hard to find, so installs from source are pretty nearly impossible. Would a binary wheel be able to do all of the crazy set up that the Windows installer does? AFAIK, wheel do not support post_install scripts. According to the comments in Scripts\pywin32_postinstall.py, it does: # copies PyWinTypesxx.dll and PythonCOMxx.dll into the system directory, # and creates a pth file According to the code, it does a lot more... I don't think pip can run this script (it even needs admin privs!). Thomas ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32 ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32
Re: [python-win32] Using pip to install pywin32
Actually that gist wouldn't help much since it uses pywin32, the thing we're trying to install. (derp!) There may be another way though. Possibly related: http://bugs.python.org/issue20641 On Fri, Feb 20, 2015 at 10:31 AM, Preston Landers pland...@gmail.com wrote: I don't think pip can run this script (it even needs admin privs!). Is there a reason it couldn't run a script that presents a UAC prompt to elevate the process? Something like this: https://gist.github.com/Preston-Landers/267391562bc96959eb41 I guess for unattended installs you could just elevate the process beforehand. -Preston On Fri, Feb 20, 2015 at 9:24 AM, Thomas Heller thel...@ctypes.org wrote: Am 20.02.2015 um 15:07 schrieb Vernon D. Cole: Pywin32 is mostly written in C, and has lots of dependencies and weird build requirements. In order to compile it, you must have the same C compiler that your release of Python was built with. For older Python versions (like 2.7) that compiler is obsolete and hard to find, so installs from source are pretty nearly impossible. Would a binary wheel be able to do all of the crazy set up that the Windows installer does? AFAIK, wheel do not support post_install scripts. According to the comments in Scripts\pywin32_postinstall.py, it does: # copies PyWinTypesxx.dll and PythonCOMxx.dll into the system directory, # and creates a pth file According to the code, it does a lot more... I don't think pip can run this script (it even needs admin privs!). Thomas ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32 ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32
Re: [python-win32] extension modules and msvc version
On Sat, Feb 21, 2015 at 3:41 AM, Zachary Turner ztur...@google.com wrote: Is the situation better in python 3 than it is in 2.7? And is anyone aware of any ways to get around this restriction so that i can write an extension module that will work with a binary release of python? It's going to be better, starting from Python 3.5; Microsoft is guaranteeing a measure of binary compatibility for future compiler versions. Unfortunately the guarantee requires some internal changes, so it's moving forward only, not backward. The fate of Python 2.7 is very much up in the air, because the compiler that was used for 2.7.0 won't be supported in 2020 (I think it might be already out of support), so there's a big question of whether or not to change compilers in the middle of a minor version. Neither option is good. ChrisA ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32
Re: [python-win32] extension modules and msvc version
Am 20.02.2015 um 17:41 schrieb Zachary Turner: Does anyone understand the technical reasons why an extension module must be compiled with the same version of msvc as python itself? Are there any workarounds? It's really quite an inconvenience. If the reason is because python27.dll and the extension module free each others' memory, then it seems like this could be solved by having each supply the other with an alloc and free function pointer, and using the correct allocator on each side. Is the situation better in python 3 than it is in 2.7? And is anyone aware of any ways to get around this restriction so that i can write an extension module that will work with a binary release of python? pep 384 solves this problem. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32
Re: [python-win32] Using pip to install pywin32
Am 20.02.2015 um 17:58 schrieb Preston Landers: Actually that gist wouldn't help much since it uses pywin32, the thing we're trying to install. (derp!) There may be another way though. Sure, you could port the gist to ctypes instead of pywin32. However, the problem is that pip doesn't run postinstall scripts (or that the wheel format does not include them). Something like that. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32