summary refs log tree commit diff stats
path: root/lib/wrappers/python.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-07-16 08:11:37 +0200
committerAraq <rumpf_a@web.de>2012-07-16 08:11:37 +0200
commit4215686cce1aaebd4021c856d504103f7e9a9586 (patch)
tree1ef722361e3d539fcd5046c04b6c3516fdf4ade0 /lib/wrappers/python.nim
parent089e7db08a8088ac6ed885fbdb4ee215033bbbf3 (diff)
downloadNim-4215686cce1aaebd4021c856d504103f7e9a9586.tar.gz
x11 example compiles again; updated python wrapper; compiler supports variables in DLLs
Diffstat (limited to 'lib/wrappers/python.nim')
-rwxr-xr-xlib/wrappers/python.nim30
1 files changed, 17 insertions, 13 deletions
diff --git a/lib/wrappers/python.nim b/lib/wrappers/python.nim
index 0801b1ae5..3c5fd46db 100755
--- a/lib/wrappers/python.nim
+++ b/lib/wrappers/python.nim
@@ -60,12 +60,14 @@ import
 
 
 when defined(windows): 
-  const dllname = "python(26|25|24|23|22|21|20|16|15).dll"
+  const dllname = "python(27|26|25|24|23|22|21|20|16|15).dll"
 elif defined(macosx):
-  const dllname = "libpython(2.6|2.5|2.4|2.3|2.2|2.1|2.0|1.6|1.5).dylib"
+  const dllname = "libpython(2.7|2.6|2.5|2.4|2.3|2.2|2.1|2.0|1.6|1.5).dylib"
 else: 
   const dllver = ".1"
-  const dllname = "libpython(2.6|2.5|2.4|2.3|2.2|2.1|2.0|1.6|1.5).so" & dllver
+  const dllname = "libpython(2.7|2.6|2.5|2.4|2.3|2.2|2.1|2.0|1.6|1.5).so" & 
+                  dllver
+
   
 const 
   PYT_METHOD_BUFFER_INCREASE* = 10
@@ -1545,26 +1547,28 @@ proc init(lib: TLibHandle) =
   PyEnum_Type = cast[PPyTypeObject](symAddr(lib, "PyEnum_Type"))
 
 # Unfortunately we have to duplicate the loading mechanism here, because Nimrod
-# does not support variables from dynamic libraries. Well designed API's don't
-# require this anyway. Python is an exception.
+# used to not support variables from dynamic libraries. Well designed API's
+# don't require this anyway. Python is an exception.
 
 var
   lib: TLibHandle
 
-when defined(windows): 
+when defined(windows):
   const
-    LibNames = ["python26.dll", "python25.dll", 
-      "python24.dll", "python23.dll", "python22.dll", "python21.dll", 
+    LibNames = ["python27.dll", "python26.dll", "python25.dll",
+      "python24.dll", "python23.dll", "python22.dll", "python21.dll",
       "python20.dll", "python16.dll", "python15.dll"]
 elif defined(macosx):
   const
-    LibNames = ["libpython2.6.dylib", "libpython2.5.dylib", 
-      "libpython2.4.dylib", "libpython2.3.dylib", "libpython2.2.dylib", 
-      "libpython2.1.dylib", "libpython2.0.dylib",
+    LibNames = ["libpython2.7.dylib", "libpython2.6.dylib",
+      "libpython2.5.dylib", "libpython2.4.dylib", "libpython2.3.dylib", 
+      "libpython2.2.dylib", "libpython2.1.dylib", "libpython2.0.dylib",
       "libpython1.6.dylib", "libpython1.5.dylib"]
-else: 
+else:
   const
-    LibNames = ["libpython2.6.so" & dllver, 
+    LibNames = [
+      "libpython2.7.so" & dllver,
+      "libpython2.6.so" & dllver, 
       "libpython2.5.so" & dllver, 
       "libpython2.4.so" & dllver, 
       "libpython2.3.so" & dllver,