File: docs-sys.path.diff

package info (click to toggle)
nose 1.3.7-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,768 kB
  • sloc: python: 15,710; makefile: 91; xml: 42; sh: 2
file content (26 lines) | stat: -rw-r--r-- 897 bytes parent folder | download | duplicates (3)
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
From: Dmitry Shachnev <mitya57@debian.org>
Date: Sat, 8 Feb 2020 12:26:00 +0300
Subject: Use correct sys.path when building docs

The parent directory contains Python 2 nose, however we need the
Python 3 version, which we will pass via PYTHONPATH.
---
 doc/conf.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/doc/conf.py b/doc/conf.py
index 34ea147..ac7f0cb 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -20,10 +20,7 @@ import sys, os
 # is relative to the documentation root, use os.path.abspath to make it
 # absolute, like shown here.
 
-# need to be brutal because of easy_install's pth hacks:
-sys.path.insert(0,
-    os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
-sys.path.insert(0, os.path.abspath('.'))
+sys.path[0] = os.path.abspath('.')
 
 from nose import __versioninfo__ as nose_version
 nose_version = tuple(str(x) for x in nose_version)