From a9cd67873c9a067bfee94689e24823795bc771a4 Mon Sep 17 00:00:00 2001 From: Bruno da Silva de Oliveira Date: Sun, 30 May 2004 23:14:10 +0000 Subject: [PATCH] - fixes module name if run from another directory where the .pyste file is located [SVN r22977] --- pyste/NEWS | 8 ++++++++ pyste/TODO | 3 +-- pyste/src/Pyste/CppParser.py | 2 +- pyste/src/Pyste/pyste.py | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pyste/NEWS b/pyste/NEWS index ede77dd7..acabfc61 100644 --- a/pyste/NEWS +++ b/pyste/NEWS @@ -1,3 +1,11 @@ +27 May 2004 +Applied patch by Paul Bridger that solves a problem on windows regarding +spaces on paths. Thanks Paul! + +Applied another patch that fixes the module name if pyste is run from +another directory of where the .pyste file is located. Patch contributted +by Paul Bridger. + 17 May 2004 Applied a patch by Roman Yakovenko that makes the export of unnamed enums better. Thanks Roman! diff --git a/pyste/TODO b/pyste/TODO index ef8623f7..e0ff578b 100644 --- a/pyste/TODO +++ b/pyste/TODO @@ -11,5 +11,4 @@ - args() support -- --file-list, allowing the user to pass the filename of a file with the pyste - files +- set policies to methods with the same name diff --git a/pyste/src/Pyste/CppParser.py b/pyste/src/Pyste/CppParser.py index 4ec72eae..4183fdda 100644 --- a/pyste/src/Pyste/CppParser.py +++ b/pyste/src/Pyste/CppParser.py @@ -111,7 +111,7 @@ class CppParser: includes = self._IncludeParams(filename) defines = self._DefineParams() # call gccxml - cmd = 'gccxml %s %s %s -fxml=%s' + cmd = 'gccxml %s %s "%s" -fxml=%s' filename = self.Unixfy(filename) xmlfile = self.Unixfy(xmlfile) status = os.system(cmd % (includes, defines, filename, xmlfile)) diff --git a/pyste/src/Pyste/pyste.py b/pyste/src/Pyste/pyste.py index a503a5c1..3d14a828 100644 --- a/pyste/src/Pyste/pyste.py +++ b/pyste/src/Pyste/pyste.py @@ -159,7 +159,7 @@ def ParseArguments(): if not files: Usage() if not module: - module = os.path.splitext(files[0])[0] + module = os.path.splitext(os.path.basename(files[0]))[0] if not out: out = module if not multiple: