From: Paul K. <Pau...@ni...> - 2010-09-28 10:33:44
|
>> You don't need to install pycxx to build pysvn. Pysvn compiles it from the Imports folder. Yes, but I didn't know that. It isn't obvious that PyCxx does what it does just via #includes. I suppose that someone planning to become a PyCxx user would work that out pretty quickly, but all I wanted was to get PySvn to compile. I didn't know how PyCxx worked. Any good intentions I had about trying to learn how it worked evaporated when the demo wouldn't compile, with an error message that was way beyond my abilities to resolve. The PySvn documentation said I need PyCxx 5 for Python 2, which wasn't in the package, so I downloaded that first. When that didn't compile under 64-bit I turned my attention to the PyCxx 6 that was in the Imports folder and tried to compile that. I even downloaded PyCxx 6 afresh in case the issue with the demo had been fixed in a later version. It took a while, but I began to suspect that the problem was with only the demo, which I didn't need unless I wanted to understand how PyCxx works, so I gave up on that and tried to compile PySvn. When that failed with a bunch of "cannot open include file" messages I decided I needed to install PyCxx before trying to compile PySvn. But then PyCxx wouldn't install because the PyCxx files weren't in the folders that its own #includes expected them to be in. It was only after a couple of days that I realized that it was nothing to do with 64-bit, or the different compiler, or something in the prerequisites that I had missed, or a macro I hadn't adjusted, but that PyCxx wouldn't install because -- The install wasn't copying the Python2 and Python3 subfolders to where the #includes expected them to be. It copies files in pycxx-6.1.1\CXX to %python%\include\CXX but it doesn't copy the subfolders . It copies files in pycxx-6.1.1\Src to %python%\share\python2.6\CXX but again it doesn't copy the subfolders. -- The redirecting #includes pointing at the Python2 and Python3 subfolders in Src/IndirectPythonInterface.cxx, Src/cxxextensions.c and Src/cxxsupport.cxx implied a folder structure different from the one I had: either they should not be in the Src folder, but one level up; or else there should be a folder Src/Src/Python2. It was only when I saw that Src/cxx_extensions.cxx had a different (and correct) path in the #include from the others that I realized I needed to fix the PyCxx code if I was going to get PySvn to compile. These are the fixes: Index: IndirectPythonInterface.cxx =================================================================== --- IndirectPythonInterface.cxx (revision 6682) +++ IndirectPythonInterface.cxx (revision 6683) @@ -37,7 +37,7 @@ #include "CXX/WrapPython.h" #if PY_MAJOR_VERSION == 2 -#include "Src/Python2/IndirectPythonInterface.cxx" +#include "Python2/IndirectPythonInterface.cxx" #else -#include "Src/Python3/IndirectPythonInterface.cxx" +#include "Python3/IndirectPythonInterface.cxx" #endif Index: cxxextensions.c =================================================================== --- cxxextensions.c (revision 6682) +++ cxxextensions.c (revision 6683) @@ -37,7 +37,7 @@ #include "CXX/WrapPython.h" #if PY_MAJOR_VERSION == 2 -#include "Src/Python2/cxxextensions.c" +#include "Python2/cxxextensions.c" #else -#include "Src/Python3/cxxextensions.c" +#include "Python3/cxxextensions.c" #endif Index: cxxsupport.cxx =================================================================== --- cxxsupport.cxx (revision 6682) +++ cxxsupport.cxx (revision 6683) @@ -37,7 +37,7 @@ #include "CXX/WrapPython.h" #if PY_MAJOR_VERSION == 2 -#include "Src/Python2/cxxsupport.cxx" +#include "Python2/cxxsupport.cxx" #else -#include "Src/Python3/cxxsupport.cxx" +#include "Python3/cxxsupport.cxx" #endif So, it's compiled now, but that doesn't help me much, because I need 64-bit Subversion .lib files to link-edit it to. Regards ________________________________ The information contained in this e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail. Please delete this e-mail and do not disclose its contents to any person. NIBC Holding N.V. nor its subsidiaries accept liability for any errors, omissions, delays of receipt or viruses in the contents of this message which arise as a result of e-mail transmission. NIBC Holding N.V. (Chamber of commerce nr. 27282935), NIBC Bank N.V. (Chamber of commerce nr. 27032036) and NIBC Investment Management N.V. (Chamber of commerce nr. 27253909) all have their corporate seat in The Hague, The Netherlands. De informatie in dit e-mailbericht is vertrouwelijk en uitsluitend bestemd voor de geadresseerde. Wanneer u dit bericht per abuis ontvangt, gelieve onmiddellijk contact op te nemen met de afzender per kerende e-mail. Wij verzoeken u dit e-mailbericht te Vernietigen en de inhoud ervan aan niemand openbaar te maken. NIBC Holding N.V. noch haar dochterondernemingen aanvaarden enige aansprakelijkheid voor onjuiste, onvolledige dan wel ontijdige overbrenging van de inhoud van een verzonden e-mailbericht, noch voor door haar daarbij overgebrachte virussen. NIBC Holding N.V. (KvK nr. 27282935), NIBC Bank N.V. (KvK nr. 27032036) and NIBC Investment Management N.V. (KvK nr. 27253909) zijn statutair gevestigd te Den Haag, Nederland. |