Re: [python-win32] Using pip to install pywin32

2015-02-20 Thread 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?
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


Re: [python-win32] Using pip to install pywin32

2015-02-20 Thread Kevin Horn
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

2015-02-20 Thread Preston Landers
  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

2015-02-20 Thread 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.

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] Using pip to install pywin32

2015-02-20 Thread Thomas Heller

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


[python-win32] Using pip to install pywin32

2015-02-19 Thread Chris Angelico
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


Re: [python-win32] Using pip to install pywin32

2015-02-19 Thread Kevin Horn
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