From 869949c424e596feb732624823913740b3e4c369 Mon Sep 17 00:00:00 2001 From: "josh.macdonald" Date: Fri, 2 Feb 2007 19:57:04 +0000 Subject: Disable external compression under Cygwin for the Python module. External compression works in the Cygwin binary, just not with Python. --- xdelta3/setup.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/xdelta3/setup.py b/xdelta3/setup.py index 2fe3b19..ed1e1aa 100755 --- a/xdelta3/setup.py +++ b/xdelta3/setup.py @@ -17,19 +17,34 @@ # # from distutils.core import setup, Extension +from distutils.util import get_platform + +# External compression support works on Windows/Cygwin, but not from +# within the Python module. It's something to do with fork() and +# exec() support. +platform = get_platform() +is_cygwin = platform.startswith('cygwin') +extcomp = 1 + +if is_cygwin: + print 'Note: not compiling external compression support for Python/Cygwin' + extcomp = 0 +#end xdelta3_ext = Extension('xdelta3', ['xdelta3.c'], define_macros = [ - ('REGRESSION_TEST',1), + ('PYTHON_MODULE',1), ('SECONDARY_DJW',1), - ('SECONDARY_FGK',1), ('VCDIFF_TOOLS',1), - ('XD3_DEBUG',1), ('XD3_POSIX',1), - ('EXTERNAL_COMPRESSION',1), ('XD3_USE_LARGEFILE64',1), - ('PYTHON_MODULE',1), + + ('EXTERNAL_COMPRESSION',extcomp), + + ('REGRESSION_TEST',0), + ('SECONDARY_FGK',0), + ('XD3_DEBUG',0), ], extra_compile_args = [ '-O3', '-g', -- cgit v1.2.3