ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/nikanabo/current/xdelta/diy/setup.py
Revision: 185
Committed: Mon May 21 18:48:22 2007 UTC (18 years, 4 months ago) by geyser
Content type: text/x-python
File size: 2498 byte(s)
Log Message:

File Contents

# Content
1 # xdelta 3 - delta compression tools and library
2 # Copyright (C) 2004, 2007. Joshua P. MacDonald
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 #
18 #
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
28 xdelta3_ext = Extension('xdelta3main',
29 ['xdelta3.c'],
30 define_macros = [
31 ('PYTHON_MODULE',1),
32 ('SECONDARY_DJW',1),
33 ('VCDIFF_TOOLS',1),
34 ('GENERIC_ENCODE_TABLES',1),
35 ('XD3_POSIX',1),
36 ('XD3_USE_LARGEFILE64',1),
37
38 # the fork/exec stuff doesn't
39 # work inside python.
40 ('EXTERNAL_COMPRESSION',0),
41
42 ('REGRESSION_TEST',0),
43 ('SECONDARY_FGK',0),
44 ('XD3_DEBUG',0),
45 ],
46 extra_compile_args = [ '-O3',
47 '-g',
48 '-funroll-loops',
49 ])
50
51 # $Format: "REL='$Xdelta3Version$'" $
52 REL='0q'
53
54 # This provides xdelta3.main(), which calls the xdelta3 command-line main()
55 # from python.
56 setup(name='xdelta3main',
57 version=REL,
58 ext_modules=[xdelta3_ext])