Files
haikuports/dev-python/nose/patches/debian/docs-sys.path.diff
OscarL 988d5a67e6 nose: clean up, support Python 3.10. (#8825)
Due to changes in setuptools, we need to run 2to3 ourselves.
While we're at it, lets apply relevant patches from Debian.

https://salsa.debian.org/python-team/packages/nose/
2023-06-09 08:57:39 +02:00

27 lines
897 B
Diff

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)