File: 02-python-multiarch.patch

package info (click to toggle)
libtcod 1.6.1%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 3,400 kB
  • ctags: 6,381
  • sloc: ansic: 20,926; cpp: 10,325; python: 3,691; makefile: 171
file content (27 lines) | stat: -rw-r--r-- 930 bytes parent folder | download
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
Description: Help the Python wrapper find libtcod.so
 This patch adds /usr/lib/<MULTIARCH>/ to the shared library search
 path in _get_cdll() in python/libtcodpy/__init__.py.
Author: Fabian Wolff <fabi.wolff@arcor.de>
Forwarded: no
Last-Update: 2016-10-18
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/python/libtcodpy/__init__.py
+++ b/python/libtcodpy/__init__.py
@@ -27,6 +27,7 @@
 
 import os
 import sys
+import sysconfig
 import ctypes
 import struct
 from ctypes import *
@@ -53,6 +54,8 @@
         returns the ctypes lib object
     '''
     pathsToTry = []
+    # 0. Debian patch: Look for libname in /usr/lib/<MULTIARCH>/.
+    pathsToTry.append(os.path.join("/usr/lib", sysconfig.get_config_var('MULTIARCH'), libname))
     # 1. Try the directory this script is located in.
     pathsToTry.append(os.path.join(__path__[0], libname))
     # 2. Try the directory of the command-line script.