[svn r37637] Fixed Windows path problems for apigen; test_apigen_functional.py now works (couldn't test with the py lib itself, though, as it wants to build greenlets and i don't have a suitable c compiler installed).

--HG--
branch : trunk
This commit is contained in:
guido 2007-01-30 21:45:18 +01:00
parent c432765556
commit 307a727a7e
3 changed files with 5 additions and 5 deletions

View File

@ -193,9 +193,9 @@ def wrap_page(project, title, contentel, navel, outputpath, stylesheeturl,
class AbstractPageBuilder(object):
def write_page(self, title, reltargetpath, project, tag, nav):
targetpath = self.base.join(reltargetpath)
stylesheeturl = relpath('%s/' % (targetpath.dirpath(),),
stylesheeturl = relpath('%s%s' % (targetpath.dirpath(), os.path.sep),
self.base.join('style.css').strpath)
scripturls = [relpath('%s/' % (targetpath.dirpath(),),
scripturls = [relpath('%s%s' % (targetpath.dirpath(), os.path.sep),
self.base.join('api.js').strpath)]
page = wrap_page(project, title,
tag, nav, self.base, stylesheeturl, scripturls)

View File

@ -42,7 +42,7 @@ class Linker(object):
finally:
del self.fromlocation
def relpath(p1, p2, sep='/', back='..', normalize=True):
def relpath(p1, p2, sep=os.path.sep, back='..', normalize=True):
""" create a relative path from p1 to p2
sep is the seperator used for input and (depending

View File

@ -94,8 +94,8 @@ def test_get_documentable_items():
'main.sub.func', 'somenamespace.baz', 'somenamespace.foo']
def test_apigen_functional():
if py.std.sys.platform == "win32":
py.test.skip("XXX test fails on windows")
#if py.std.sys.platform == "win32":
# py.test.skip("XXX test fails on windows")
fs_root, package_name = setup_fs_project('test_apigen_functional')
tempdir = py.test.ensuretemp('test_apigen_functional_results')
pydir = py.magic.autopath().dirpath().dirpath().dirpath()