-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'pip install pywin32' doesn't work #669
Comments
This should be listed as a "Feature Request", rather than a "Bug". Original comment by: kf7xm |
I issued a 'Feature Request': https://sourceforge.net/p/pywin32/feature-requests/110/ Original comment by: robi-wan |
Sorry, not packaging for python (bdist_wininst is NOT packaging for python) is a bug. Original comment by: tritium21 |
For what it's worth, Original comment by: glyf |
This would probably help solve https://tahoe-lafs.org/trac/tahoe-lafs/ticket/142 Original comment by: zooko |
You can see my binary wheel here: https://glyph.im/pywin32/index/pywin32/index.html I screwed up the version information (".glyph" is apparently not a valid version suffix) so pip has a little trouble with it, you have to identify it just right to install it, but it otherwise works reasonably well. Original comment by: glyf |
So is there any chance that pywin32 could be installed via pip one day? Problem is that .exe installers couldn't be installed from command line. Original comment by: stopiccot |
To be clear, there is almost no development work to do here; it is, at most, a one-line change. The issue is that someone with an interest in this problem needs to be granted access to the PyPI packages. I am "glyph" on PyPI and would gladly do the legwork necessary to upload binary wheels that would allow pip to install pywin32. If someone would grant me access to the project I could probably have it done in under a week. Original comment by: glyf |
If it is a matter of volunteers with compilers, count me in. Original comment by: tritium21 |
Since there has been no action on this for over six months, I have created a different distribution on PyPI: https://pypi.python.org/pypi/pypiwin32 You can "pip install pypiwin32" now into virtualenvs and the like, and that should work. Original comment by: glyf |
I know it's a "slippery slope" type of request, but any chance of Python 3.4 builds as well, Glyph? It's also worth noting that (as far as I can tell) "wheel convert" on the pywin32 wininst exes works fine as well. So you don't even need a build environment. Original comment by: pmoore |
Hi Paul, I can give you upload credentials to the project on PyPI if that would be helpful. Original comment by: glyf |
Glyph - I'd be happy to wheel convert the existing wininst builds and upload them there. But I just tried to use "pip wheel" to build a Python 3.4 wheel from source, and it failed with errors I don't have time to diagnose. If wheel converted wheels are acceptable, though, I'll take up your offer, thanks. Original comment by: pmoore |
What's your PyPI username? Original comment by: glyf |
Doh. Yeah, that would help - pf_moore. Original comment by: pmoore |
Done. You should be able to upload wheels. Original comment by: glyf |
Thanks. Just looking further at the wheel you created for pypiwin32, I see that you have given it a name (in the metadata, as well as the project name) of pypiwin32. Presumably that means that it won't satisfy any dependencies on pywin32 specified in other projects. Was that intentional? I doubt it'll matter though as projects won't be specifying pywin32 as a dependency because of the fact that it's not on PyPI... One reason I ask is that wheel convert doesn't allow changing the name, so it'll need some extra work to do that. But I'll sort that out and upload the Python 3 wheels. Original comment by: pmoore |
OK, we have (minimally tested) Python 3.x wheels uploaded. Original comment by: pmoore |
I would certainly have preferred to upload wheels as "pywin32" but a mismatch between what's on PyPI and what's in the wheel itself will break pip. I hope you didn't actually change the name of the wheels? The package still imports under the same name. Original comment by: glyf |
(If I could upload wheels to pywin32, i would have just done it and we wouldn't be having this conversation :)) Original comment by: glyf |
What I did was "wheel convert pywin32*.exe" which gives wheels called pywin32-bla-blah.whl. I then put together a script that modified those wheels: (a) renamed them to pypiwin32, (b) modified the metadata files to change the project name to pypiwin32, (c) changed the dist-info directory name to pypiwin32.dist-info and (d) patched up the RECORD file to reflect the changes. I also patched the pth file as you did in your wheel (in the process I "accidentally" renamed the pth file to pypiwin32.pth, but that doesn't matter so I left it like that. I can upload the script somewhere if it's useful to others. It's a bit of a quick hack but it does the job. Original comment by: pmoore |
Huh. Where did you get the .exe's? I take it you didn't build them from the sdist I put on pyPI? Uploading that script and pointing to it from the PyPI page would be helpful, just to facilitate if someone with greater interest wants to maintain it :). It might also be interesting for me to make the other builds using "wheel convert" rather than my own hackery. However, without changes to the '.pth' files, the wheels won't actually work inside a virtualenv - did you test 'pip install' first? Ideally on a machine without a compiler? Original comment by: glyf |
I got the exes from here (the official pywin32 ones). I'll find somewhere to put the script and then link to it. Actually, I just made a gist for it - https://gist.github.com/pfmoore/fd09fff11b4fa5f8cb25 I thought I said above - I made the pth file changes in the script too. For testing I installed in a clean virtualenv (I used pip -vvv to see the details and checked it was using the wheel and not compiling) and then just created a MessageBox. That should confirm the basic functionality. Stuff like COM might not work, because it needs stuff registered with the system, but I suspect that would be true of your build as well (it's what the postinstall script does, and wheel installs don't support postinstall scripts). If you have a more comprehensive set of tests that your wheel passes, I'll happily run them on my builds. Original comment by: pmoore |
Hmm, not sure I can add the script link to the PyPI page without putting it into the distribution metadata, which means editing the sources, which (in turn) means having to build from source. So never mind, I'll just leave the link here (above). Original comment by: pmoore |
…install on windows. see: mhammond/pywin32#669
Note to readers that |
@glyph Is this issue still relevant? Are the current wheels good for Twisted or do you still need anything? |
@Avasam I think that this was fixed quite some time ago, not sure why the issue is still open. |
That's what I'm working through rn ^^" Lots of old issues migrated from sourceforge. Thanks for taking the time to answer! |
It would be great if pywin32 could be distributed as a binary wheel. This is the last remaining dependency of Twisted on Windows which requires manual intervention and installation.
Reported by: glyf
Original Ticket: pywin32/bugs/669
The text was updated successfully, but these errors were encountered: