[pygccxml-development] Header path normalization and cross-platform code
Brought to you by:
mbaas,
roman_yakovenko
From: Patrick H. <pat...@pr...> - 2009-04-22 21:44:55
|
I am working on setting up a development environment where team members can run Py++ from Linux, Windows, or Mac OS X. Thus far, we have struggled to get GCC-XML to handle our code on Windows, but we are getting very close to having that resolved. In the process, I have come across some unexpected behavior from Py++. Specifically, use of the static method pyplusplus.code_creators.include_directories.include_directories_t.normalize() produces code on Windows that will not compile on other platforms. For example, if I have a class MyClass, Py++ on Windows generates code that references the .hpp file as myclass.pypp.hpp. The generated file, however, will be named MyClass.pypp.hpp. This won't work on a case-sensitive file system. The second issue is with the directory separator. If I use pyplusplus.code_creators.module.module_t.replace_included_headers() and tell Py++ to include a file such as <dir/SomeHeader.h>, the generated output on Windows will reference <dir\someheader.h>. Again, the case-sensitive name is lost, and the directory separator has changed to be one that only works when building on Windows. Is there a specific need for header path normalization? Under typical circumstances, I would expect that the UNIX-style path would always work on Windows. At the moment, I can't think of an example of when it would not. If header path normalization cannot be removed, could an option be added to pyplusplus.code_creators.include_directories.include_directories_t so that the use of header path normalization can be turned off? Given that it is a static method, a class variable for include_directories_t or a global variable for the pyplusplus.code_creators.include_directories module would do the job. -Patrick -- Patrick L. Hartling Senior Software Engineer, Priority 5 http://www.priority5.com/ The information transmitted in this communication is intended only for the person or entity to which it is addressed and contains proprietary material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please destroy any copies, contact the sender and delete the material from any computer. |