1 --- subvertpy-0.7.2/setup.py.wiget 2010-03-11 15:15:17.000000000 +0100
2 +++ subvertpy-0.7.2/setup.py 2010-03-11 15:21:02.000000000 +0100
3 @@ -76,6 +76,26 @@ def apr_config(arg):
4 res = run_cmd(apr_config_cmd, arg)
8 + apu_config_cmd = os.getenv("APU_CONFIG")
9 + if apu_config_cmd is None:
10 + cmds = ["apu-1-config", "/usr/local/apr-utils/bin/apu-1-config",
11 + "/opt/local/bin/apu-1-config", ]
14 + res = run_cmd(cmd, arg)
15 + apu_config_cmd = cmd
17 + except CommandException, e:
18 + if not e.not_found():
21 + raise Exception("apu-config not found."
22 + " Please set APU_CONFIG environment variable")
24 + res = run_cmd(apu_config_cmd, arg)
29 """Determine the APR header file location."""
30 @@ -84,6 +104,13 @@ def apr_build_data():
31 raise Exception("APR development headers not found")
34 +def apu_build_data():
35 + """Determine the APR-UTILS header file location."""
36 + includedir = apu_config("--includedir")
37 + if not os.path.isdir(includedir):
38 + raise Exception("APR-UTILS development headers not found")
39 + return (includedir,)
43 """Determine the Subversion header file location."""
44 @@ -108,8 +135,9 @@ def is_keychain_provider_available():
45 Checks for the availability of the Keychain simple authentication provider in Subversion by compiling a simple test program.
47 abd = apr_build_data()
48 + aubd = apu_build_data()
49 sbd = svn_build_data()
50 - gcc_command_args = ['gcc'] + ['-I' + inc for inc in sbd[0]] + ['-L' + lib for lib in sbd[1]] + ['-I' + abd[0], '-lsvn_subr-1', '-x', 'c', '-']
51 + gcc_command_args = ['gcc'] + ['-I' + inc for inc in sbd[0]] + ['-L' + lib for lib in sbd[1]] + ['-I' + abd[0], '-I' + aubd[0], '-lsvn_subr-1', '-x', 'c', '-']
52 (gcc_in, gcc_out, gcc_err) = os.popen3(gcc_command_args)
55 @@ -223,10 +251,11 @@ if os.name == "nt":
56 return includes, lib_dirs, aprlibs+libs,
58 (apr_includedir, ) = apr_build_data()
59 +(apu_includedir, ) = apu_build_data()
60 (svn_includedirs, svn_libdirs, extra_libs) = svn_build_data()
62 def SvnExtension(name, *args, **kwargs):
63 - kwargs["include_dirs"] = [apr_includedir] + svn_includedirs + ["subvertpy"]
64 + kwargs["include_dirs"] = [apr_includedir, apu_includedir] + svn_includedirs + ["subvertpy"]
65 kwargs["library_dirs"] = svn_libdirs
67 # on windows, just ignore and overwrite the libraries!