From a90fb8112c3db7b4133f9b30e4a113700ea4f403 Mon Sep 17 00:00:00 2001 From: hpk Date: Wed, 14 Feb 2007 02:03:51 +0100 Subject: [PATCH] [svn r38775] use relative paths, and compute them late --HG-- branch : trunk --- py/conftest.py | 10 ++++------ py/doc/conftest.py | 6 ++++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/py/conftest.py b/py/conftest.py index 0b96badb1..d78ade99a 100644 --- a/py/conftest.py +++ b/py/conftest.py @@ -19,8 +19,6 @@ nomagic = False import py Option = py.test.config.Option -here = py.magic.autopath().dirpath() - option = py.test.config.addoptions("execnet options", Option('-S', '', action="store", dest="sshtarget", default=None, @@ -28,13 +26,13 @@ option = py.test.config.addoptions("execnet options", "user@codespeak.net")), Option('', '--apigenpath', action="store", dest="apigenpath", - default=here.join("../apigen").strpath, + default="../apigen", type="string", - help="absolute path to where apigen docs are built"), + help="relative path to apigen doc output location (relative from py/)"), Option('', '--docpath', action='store', dest='docpath', - default=here.join('doc').strpath, type='string', - help='absolute path to where the docs are built'), + default="doc", type='string', + help="relative path to doc output location (relative from py/)"), ) dist_rsync_roots = ['.'] diff --git a/py/doc/conftest.py b/py/doc/conftest.py index 111d11e04..d37fc3c14 100644 --- a/py/doc/conftest.py +++ b/py/doc/conftest.py @@ -4,6 +4,8 @@ from py.__.misc import rest from py.__.apigen.linker import relpath import os +pypkgdir = py.path.local(py.__file__).dirpath() + mypath = py.magic.autopath().dirpath() Option = py.test.config.Option @@ -23,14 +25,14 @@ def get_apigenpath(): path = os.environ.get('APIGENPATH') if path is None: path = option.apigenpath - return py.path.local(path) + return pypkgdir.join(path, abs=True) def get_docpath(): from py.__.conftest import option path = os.environ.get('DOCPATH') if path is None: path = option.docpath - return py.path.local(path) + return pypkgdir.join(path, abs=True) def get_apigen_relpath(): return relpath(get_apigenpath().strpath, get_docpath().strpath)