Monday, February 11, 2008

consolidated _core-*/ to _core/

Last year Pyrex, then version 0.9.5.1a, did not support compile-time conditions for things such as platform specific code. To work around this used different _core directories, one for each platform, and a platform test in setup.py would determine which directory soy._core was compiled from.

While functional, this created duplicated work and a fairly messy source tree with four different _core-* directories. With Pyrex 0.9.6 release came support for code such as this:

IF UNAME_SYSNAME == "Windows":
include "icky_definitions.pxi"
ELIF UNAME_SYSNAME == "Darwin":
include "nice_definitions.pxi"
ELIF UNAME_SYSNAME == "Linux":
include "penguin_definitions.pxi"
ELSE:
include "other_definitions.pxi"

... and, thus, we could finally merge those _core-* directories into src/_core and remove kludge from setup.py. Tonight that's exactly what I did. Behold, http://svn.pysoy.org/trunk/pysoy/src

No comments: