| @@ -1,3 +1,8 @@ | |||||
| Version 0.8.5a14 | |||||
| ============================================================ | |||||
| * Bug Fix: Added support for plugin paths relative to site. (Issue #107) | |||||
| Version 0.8.5a13 | Version 0.8.5a13 | ||||
| ============================================================ | ============================================================ | ||||
| @@ -1,4 +1,4 @@ | |||||
| Version 0.8.5a13 | |||||
| Version 0.8.5a14 | |||||
| A brand new **hyde** | A brand new **hyde** | ||||
| ==================== | ==================== | ||||
| @@ -326,7 +326,7 @@ class CLTransformer(Plugin): | |||||
| # Honour the PATH environment variable. | # Honour the PATH environment variable. | ||||
| if app_path is not None and not os.path.isabs(app_path): | if app_path is not None and not os.path.isabs(app_path): | ||||
| app_path = discover_executable(app_path) | |||||
| app_path = discover_executable(app_path, self.site.sitepath) | |||||
| if app_path is None: | if app_path is None: | ||||
| raise self.template.exception_class( | raise self.template.exception_class( | ||||
| @@ -124,12 +124,17 @@ def first_match(predicate, iterable): | |||||
| return item | return item | ||||
| return None | return None | ||||
| def discover_executable(name): | |||||
| def discover_executable(name, sitepath): | |||||
| """ | """ | ||||
| Finds an executable in the path list provided by the PATH | |||||
| environment variable. | |||||
| Finds an executable in the given sitepath or in the | |||||
| path list provided by the PATH environment variable. | |||||
| """ | """ | ||||
| for path in os.environ['PATH'].split(os.pathsep): | |||||
| # Check if an executable can be found in the site path first. | |||||
| # If not check the os $PATH for its presence. | |||||
| paths = [unicode(sitepath)] + os.environ['PATH'].split(os.pathsep) | |||||
| for path in paths: | |||||
| full_name = os.path.join(path, name) | full_name = os.path.join(path, name) | ||||
| if os.path.exists(full_name): | if os.path.exists(full_name): | ||||
| return full_name | return full_name | ||||
| @@ -3,4 +3,4 @@ | |||||
| Handles hyde version | Handles hyde version | ||||
| TODO: Use fabric like versioning scheme | TODO: Use fabric like versioning scheme | ||||
| """ | """ | ||||
| __version__ = '0.8.5a13' | |||||
| __version__ = '0.8.5a14' | |||||