Hi Mark and friends,

for a customer, I had to build pywin32 with VS2010, and when it finally
worked after some changes from https://wiki.python.org/moin/VS2010,
I still could not run

    import win32con

I tried to find out why, to no success. I examined some older installation logs
on my machine, and the installation of win32/lib was in fact done correctly.

With the recent setuptools (tested with 1.2.1 and 1.3.2), the 'py_modules'
entry of setup.py seems to be ignored.

After pulling hair until I became almost bald, I ended up with the following
patch to pywin32 version 217 (218 does not work for me, missing files):

Here is the patch if it makes sense to submit it here:

------------------------------------------------------------
From aaea11c6b7560969255e4a1d5dd7d07fa08dae47 Mon Sep 17 00:00:00 2001
From: Christian Tismer <tis...@stackless.com>
Date: Sun, 10 Nov 2013 22:30:05 +0100
Subject: [PATCH] add win32/lib files.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This seems to be an incompatibility with recent setuptools. (tested 1.1.6 and 1.3.2)
Should be investigated further who has a bug here…
---
 pywin32-217/setup.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pywin32-217/setup.py b/pywin32-217/setup.py
index f77eecf..4480d00 100644
--- a/pywin32-217/setup.py
+++ b/pywin32-217/setup.py
@@ -2372,6 +2372,11 @@ dist = setup(name="pywin32",
                 'pythonwin/pywin/Demos/app/*.py',
                 'pythonwin/pywin/Demos/ocx/*.py',
                 'pythonwin/license.txt',
+                # CT 20131110 BEGIN
+                # for some reason, the files in 'py_modules' are ignored.
+                # this may be a setuptools problem.
+                'win32/lib/*.py',
+                # CT 20131110 END
                 'win32/license.txt',
                 'win32/scripts/*.py',
                 'win32/test/*.py',
--
1.7.11.1

------------------------------------------------------------

cheers -- Chris

--
Christian Tismer             :^)   <mailto:tis...@stackless.com>
Software Consulting          :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* http://starship.python.net/
14482 Potsdam                :     PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776  fax +49 (30) 700143-0023
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to