diff options
-rwxr-xr-x | xdelta3/setup.py | 25 |
1 files 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 @@ | |||
17 | # | 17 | # |
18 | # | 18 | # |
19 | from distutils.core import setup, Extension | 19 | from distutils.core import setup, Extension |
20 | from distutils.util import get_platform | ||
21 | |||
22 | # External compression support works on Windows/Cygwin, but not from | ||
23 | # within the Python module. It's something to do with fork() and | ||
24 | # exec() support. | ||
25 | platform = get_platform() | ||
26 | is_cygwin = platform.startswith('cygwin') | ||
27 | extcomp = 1 | ||
28 | |||
29 | if is_cygwin: | ||
30 | print 'Note: not compiling external compression support for Python/Cygwin' | ||
31 | extcomp = 0 | ||
32 | #end | ||
20 | 33 | ||
21 | xdelta3_ext = Extension('xdelta3', | 34 | xdelta3_ext = Extension('xdelta3', |
22 | ['xdelta3.c'], | 35 | ['xdelta3.c'], |
23 | define_macros = [ | 36 | define_macros = [ |
24 | ('REGRESSION_TEST',1), | 37 | ('PYTHON_MODULE',1), |
25 | ('SECONDARY_DJW',1), | 38 | ('SECONDARY_DJW',1), |
26 | ('SECONDARY_FGK',1), | ||
27 | ('VCDIFF_TOOLS',1), | 39 | ('VCDIFF_TOOLS',1), |
28 | ('XD3_DEBUG',1), | ||
29 | ('XD3_POSIX',1), | 40 | ('XD3_POSIX',1), |
30 | ('EXTERNAL_COMPRESSION',1), | ||
31 | ('XD3_USE_LARGEFILE64',1), | 41 | ('XD3_USE_LARGEFILE64',1), |
32 | ('PYTHON_MODULE',1), | 42 | |
43 | ('EXTERNAL_COMPRESSION',extcomp), | ||
44 | |||
45 | ('REGRESSION_TEST',0), | ||
46 | ('SECONDARY_FGK',0), | ||
47 | ('XD3_DEBUG',0), | ||
33 | ], | 48 | ], |
34 | extra_compile_args = [ '-O3', | 49 | extra_compile_args = [ '-O3', |
35 | '-g', | 50 | '-g', |