Skip to content
Permalink
Browse files
All plugin dirs and better Nikola path (#2113)
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Feb 11, 2016
1 parent f4b38ae commit 5a6ad54ee4a82ed9801494a29a505f023190978d
Showing with 8 additions and 5 deletions.
  1. +3 −3 nikola/nikola.py
  2. +5 −2 nikola/plugins/command/auto/__init__.py
@@ -845,19 +845,19 @@ def init_plugins(self, commands_only=False):
self.plugin_manager.getPluginLocator().setPluginInfoExtension('plugin')
extra_plugins_dirs = self.config['EXTRA_PLUGINS_DIRS']
if sys.version_info[0] == 3:
places = [
self._plugin_places = [
resource_filename('nikola', 'plugins'),
os.path.join(os.getcwd(), 'plugins'),
os.path.expanduser('~/.nikola/plugins'),
] + [path for path in extra_plugins_dirs if path]
else:
places = [
self._plugin_places = [
resource_filename('nikola', utils.sys_encode('plugins')),
os.path.join(os.getcwd(), utils.sys_encode('plugins')),
os.path.expanduser('~/.nikola/plugins'),
] + [utils.sys_encode(path) for path in extra_plugins_dirs if path]

self.plugin_manager.getPluginLocator().setPluginPlaces(places)
self.plugin_manager.getPluginLocator().setPluginPlaces(self._plugin_places)
self.plugin_manager.locatePlugins()
bad_candidates = set([])
for p in self.plugin_manager._candidates:
@@ -43,6 +43,7 @@
import webbrowser
from wsgiref.simple_server import make_server
import wsgiref.util
import pkg_resources

from blinker import signal
try:
@@ -157,7 +158,7 @@ def _execute(self, options, args):

# Do not duplicate entries -- otherwise, multiple rebuilds are triggered
watched = set([
'templates/', 'plugins/',
'templates/'
] + [get_theme_path(name) for name in self.site.THEMES])
for item in self.site.config['post_pages']:
watched.add(os.path.dirname(item[0]))
@@ -167,8 +168,10 @@ def _execute(self, options, args):
watched.add(item)
for item in self.site.config['LISTINGS_FOLDERS']:
watched.add(item)
for item in self.site._plugin_places:
watched.add(item)
# Nikola itself (useful for developers)
watched.add(os.path.dirname(nikola.__file__))
watched.add(pkg_resources.resource_filename('nikola', ''))

out_folder = self.site.config['OUTPUT_FOLDER']
if options and options.get('browser'):

0 comments on commit 5a6ad54

Please sign in to comment.