File: fix_build_dir_in_tests.patch

package info (click to toggle)
python-hiredis 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 408 kB
  • sloc: ansic: 4,214; python: 271; makefile: 10
file content (29 lines) | stat: -rw-r--r-- 884 bytes parent folder | download | duplicates (2)
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
28
29
From b47cba0a1ee062273569c076f96562770e641131 Mon Sep 17 00:00:00 2001
From: SVN-Git Migration <python-modules-team@lists.alioth.debian.org>
Date: Thu, 8 Oct 2015 12:13:26 -0700
Subject: fix_build_dir_in_tests

Patch-Name: fix_build_dir_in_tests.patch
---
 test/__init__.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/__init__.py b/test/__init__.py
index 08a10a4..87bc6a9 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -1,11 +1,12 @@
 import glob, os.path, sys
+from os import environ
 
 version = sys.version.split(" ")[0]
 majorminor = version[0:3]
 
 # Add path to hiredis.so load path
-path = glob.glob("build/lib*-%s/hiredis" % majorminor)[0]
-sys.path.insert(0, path)
+path = glob.glob("build/lib*-%s/hiredis" % majorminor)
+sys.path.insert(0, environ.get('BUILDDIR', path and path[0]))
 
 from unittest import *
 from . import reader