Package: cypari2 / 2.1.2-2

doctest-find-module.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Let the doctests find cypari2
 Prepend the build python path to sys.path.
Author: Tobias Hansen <thansen@debian.org>

--- a/tests/rundoctest.py
+++ b/tests/rundoctest.py
@@ -7,6 +7,11 @@
 path = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))
 os.chdir(path)
 sys.path.append(path)
+
+# Add the path where cypari2 resides during the Debian package build
+temppath = path + '/.pybuild/cpython' + str(sys.version_info[0]) + '_' + str(sys.version_info[0]) + '.' + str(sys.version_info[1]) + '_cypari2/build'
+sys.path = [temppath] + sys.path
+
 import autogen
 import cypari2
 import doctest