summaryrefslogtreecommitdiff
path: root/databases/py-odbc/files/patch-setup-libs
blob: e228c519965212313eaa97c65ce3679a841c88de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- setup.py.orig	2009-04-15 14:10:36.000000000 -0600
+++ setup.py	2009-06-24 09:15:04.203757061 -0600
@@ -54,8 +54,16 @@
     else:
         # Other posix-like: Linux, Solaris, etc.
 
+        try:
+            include = '-I'+os.environ['PREFIX']+'/include'
+            lib = '-L'+os.environ['PREFIX']+'/lib'
+        except:
+            include = '-I/usr/local/include'
+            lib = '-L/usr/local/lib'
+
         # Python functions take a lot of 'char *' that really should be const.  gcc complains about this *a lot*
-        extra_compile_args = ['-Wno-write-strings']
+        extra_compile_args = ['-Wno-write-strings', include, lib]
+        extra_link_args = [ lib ]
 
         # What is the proper way to detect iODBC, MyODBC, unixODBC, etc.?
         libraries.append('odbc')