1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
#! /usr/bin/python2.4
# Copyright 2007 Google Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""Build the include server module.
Note: the version number should be passed to this script through
the environment variable DISTCC_VERSION.
"""
__author__ = "Manos Renieris"
import distutils
import os
from distutils.core import setup
from distutils.extension import Extension
ext = Extension(
name="include_server.distcc_pump_c_extensions",
sources=[
'../src/clirpc.c',
'../src/clinet.c',
'../src/state.c',
'../src/srvrpc.c',
'../src/pump.c',
'../src/rpc.c',
'../src/io.c',
'../src/include_server_if.c',
'../src/trace.c',
'../src/util.c',
'../src/tempfile.c',
'../src/filename.c',
'../src/bulk.c',
'../src/sendfile.c',
'../src/compress.c',
'../src/argutil.c',
'../src/cleanup.c',
'../src/emaillog.c',
'../src/timeval.c',
'../src/netutil.c',
'../lzo/minilzo.c',
'c_extensions/distcc_pump_c_extensions_module.c',
],
include_dirs = ["../src",
"../lzo",
os.path.join(os.getenv("BUILDDIR") or "",
"src"),
os.path.join(os.getenv("BUILDDIR") or "",
"../src"),
os.path.join(os.getenv("BUILDDIR") or "",
"../../src"),
],
define_macros = [('_GNU_SOURCE', 1)],
library_dirs = [],
libraries = [],
runtime_library_dirs = [],
extra_objects = [],
# This is the same list as is in configure.ac, except we leave out
# -Wmissing-prototypes and -Wmissing-declarations, which don't apply
# to python extensions (it exports global fns via a pointer),
# and -Wwrite-strings, which just had too many false positives.
extra_compile_args = ("-W -Wall -Wimplicit -Wuninitialized "
"-Wshadow -Wpointer-arith -Wcast-align "
"-Waggregate-return -Wstrict-prototypes "
"-Wnested-externs -Werror").split()
)
args = {
'name': "include_server",
'package_dir': {'include_server':'.'},
'version': os.getenv("DISTCC_VERSION") or 'unknown',
'description': "Include server for distcc-pump",
'author': "Nils Klarlund",
'author_email': "opensource@google.com",
'url': 'http://code.google.com/p/distcc-pump',
'long_description': """The include server is part of distcc-pump.""",
'packages': ["include_server"],
'ext_modules': [ext],
}
setup(**args)
|