Skip to content
Browse files
Basic untested implementation of plugin dependencies
  • Loading branch information
ralsina committed Oct 19, 2016
1 parent 8a60c09 commit cd80704d2b73c04faed5a934ed073fe8e5ccfdc0
Showing 1 changed file with 20 additions and 0 deletions.
@@ -265,6 +265,7 @@ def do_install(self, url, name, show_install_notes=True):
'package manager.')
else:'Dependency installation succeeded.')

reqnpypath = os.path.join(dest_path, 'requirements-nonpy.txt')
if os.path.exists(reqnpypath):
LOGGER.notice('This plugin has third-party '
@@ -280,6 +281,25 @@ def do_install(self, url, name, show_install_notes=True):

print('You have to install those yourself or through a package '

req_plug_path = os.path.join(dest_path, 'requirements-plugins.txt')
if os.path.exists(req_plug_path):
LOGGER.notice('This plugin requires other nikola plugins.')'Installing plugins using Nikola...')
print('Contents of the requirements-nonpy.txt file:\n')
with, 'r', encoding='utf-8') as inf:
for plugname in inf.readlines():
subprocess.check_call((sys.executable, '-m', 'nikola', 'plugin', '-i', reqpath))
except subprocess.CalledProcessError:
LOGGER.error('Could not install a plugin.')
print('Contents of the requirements-plugins.txt file:\n')
with, 'r', encoding='utf-8') as fh:
print(utils.indent(, 4 * ' '))
print('You have to install those yourself manually.')
else:'Dependency installation succeeded.')

confpypath = os.path.join(dest_path, '')
if os.path.exists(confpypath) and show_install_notes:
LOGGER.notice('This plugin has a sample config file. Integrate it with yours in order to make this plugin work!')

0 comments on commit cd80704

Please sign in to comment.