Lines 1-22
Link Here
|
1 |
--- setup.py.orig 2009-04-15 14:10:36.000000000 -0600 |
1 |
--- setup.py.orig 2012-06-24 17:49:34.000000000 -0600 |
2 |
+++ setup.py 2009-06-24 09:15:04.203757061 -0600 |
2 |
+++ setup.py 2012-12-06 11:47:02.121782861 -0600 |
3 |
@@ -54,8 +54,16 @@ |
3 |
@@ -156,6 +156,15 @@ |
4 |
else: |
4 |
# What is the proper way to detect iODBC, MyODBC, unixODBC, etc.? |
5 |
# Other posix-like: Linux, Solaris, etc. |
5 |
settings['libraries'].append('odbc') |
6 |
|
6 |
|
7 |
+ try: |
7 |
+ if sys.platform.startswith('freebsd'): |
8 |
+ include = '-I'+os.environ['PREFIX']+'/include' |
8 |
+ settings['library_dirs'] = ['/usr/local/lib/'] |
9 |
+ lib = '-L'+os.environ['PREFIX']+'/lib' |
9 |
+ settings['include_dirs'] = ['/usr/local/include/'] |
10 |
+ except: |
10 |
+ freebsd_prefix = '/usr/local' |
11 |
+ include = '-I/usr/local/include' |
11 |
+ if 'PREFIX' in os.environ: |
12 |
+ lib = '-L/usr/local/lib' |
12 |
+ freebsd_prefix = os.environ['PREFIX'] |
|
|
13 |
+ if 'PYTHONPREFIX_SITELIBDIR' in os.environ: |
14 |
+ sys.path.append('/'.join(freebsd_prefix, os.environ['PYTHONPREFIX_SITELIBDIR'])) |
13 |
+ |
15 |
+ |
14 |
# Python functions take a lot of 'char *' that really should be const. gcc complains about this *a lot* |
16 |
return settings |
15 |
- extra_compile_args = ['-Wno-write-strings'] |
17 |
|
16 |
+ extra_compile_args = ['-Wno-write-strings', include, lib] |
|
|
17 |
+ extra_link_args = [ lib ] |
18 |
|
18 |
|
19 |
# What is the proper way to detect iODBC, MyODBC, unixODBC, etc.? |
|
|
20 |
libraries.append('odbc') |
21 |
|
22 |
|