From 22ec6d94e3cc2439f89003cbbcf3f0b8b54dc484 Mon Sep 17 00:00:00 2001 From: Chris MacMackin Date: Tue, 26 Jul 2016 23:11:17 -0300 Subject: [PATCH] Fixed evaluation of paths specifed in CLI and processing attributes. --- ford/__init__.py | 15 ++++++--------- ford/sourceform.py | 1 - setup.py | 4 ++-- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/ford/__init__.py b/ford/__init__.py index 513af9eb..fd7c59ba 100644 --- a/ford/__init__.py +++ b/ford/__init__.py @@ -47,7 +47,7 @@ __author__ = "Chris MacMackin, Jacob Williams, Marco Restelli, Iain Barrass, Jérémie Burgalat, Stephen J. Turnbull, Balint Aradi" __credits__ = ["Stefano Zhagi", "Izaak Beekman", "Gavin Huttley"] __license__ = "GPLv3" -__version__ = "5.0.2" +__version__ = "5.0.3" __maintainer__ = "Chris MacMackin" __status__ = "Production" @@ -185,6 +185,11 @@ def initialize(): listopts = ['extensions','fpp_extensions','fixed_extensions','display', 'extra_vartypes','src_dir','exclude','exclude_dir', 'macro','include','extra_mods','extra_filetypes'] + # Evaluate paths relative to project file location + base_dir = os.path.abspath(os.path.dirname(args.project_file.name)) + for var in ['src_dir','page_dir','output_dir','exclude_dir','graph_dir','media_dir','include']: + if var in proj_data: + proj_data[var] = [os.path.normpath(os.path.join(base_dir,os.path.expanduser(os.path.expandvars(p)))) for p in proj_data[var]] if args.warn: args.warn = 'true' else: @@ -261,14 +266,6 @@ def initialize(): '''.format(proj_data['gitter_sidecar'].strip()) - # Evaluate paths relative to project file location - base_dir = os.path.abspath(os.path.dirname(args.project_file.name)) - for var in ['src_dir','page_dir','output_dir','exclude_dir','graph_dir','media_dir','include']: - if var in proj_data: - if var in listopts: - proj_data[var] = [os.path.normpath(os.path.join(base_dir,os.path.expanduser(os.path.expandvars(p)))) for p in proj_data[var]] - else: - proj_data[var] = os.path.normpath(os.path.join(base_dir,os.path.expanduser(os.path.expandvars(proj_data[var])))) # Handle preprocessor: if proj_data['preprocess'].lower() == 'true': if proj_data['preprocessor']: diff --git a/ford/sourceform.py b/ford/sourceform.py index cc8c59c2..558741c0 100644 --- a/ford/sourceform.py +++ b/ford/sourceform.py @@ -939,7 +939,6 @@ def process_attribs(self): for attr in self.attr_dict.get(var.name.lower(),[]): if attr == 'public' or attr == 'private' or attr == 'protected': var.permission = attr - self.attr_dict.get[var.name.lower()] elif attr[0:6] == 'intent': var.intent = attr[7:-1] elif DIM_RE.match(attr) and ('pointer' in attr or 'allocatable' in attr): diff --git a/setup.py b/setup.py index 2cf1ea2d..bb04a511 100644 --- a/setup.py +++ b/setup.py @@ -12,13 +12,13 @@ name = 'FORD', packages = ['ford'], include_package_data = True, - version = '5.0.2', + version = '5.0.3', description = 'FORD, standing for FORtran Documenter, is an automatic documentation generator for modern Fortran programs.', long_description = long_description, author = 'Chris MacMackin', author_email = 'cmacmackin@gmail.com', url = 'https://github.com/cmacmackin/ford/', - download_url = 'https://github.com/cmacmackin/ford/tarball/5.0.2', + download_url = 'https://github.com/cmacmackin/ford/tarball/5.0.3', keywords = ['Markdown', 'Fortran', 'documentation', 'comments'], classifiers=[ # How mature is this project? Common values are