diff options
| author | 2014-02-28 08:49:38 -0300 | |
|---|---|---|
| committer | 2014-02-28 08:49:38 -0300 | |
| commit | 2828399ba5cbb14502b023d4de1ba02f13dd5055 (patch) | |
| tree | 38012b6bacaa508ca56fb6f4ba87b912bb54b8c9 /nikola/plugins/command/install_plugin.py | |
| parent | ca94afc07df55cb7fc6fe3b4f3011877b7881195 (diff) | |
Imported Upstream version 6.3.0upstream/6.3.0
Diffstat (limited to 'nikola/plugins/command/install_plugin.py')
| -rw-r--r-- | nikola/plugins/command/install_plugin.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/nikola/plugins/command/install_plugin.py b/nikola/plugins/command/install_plugin.py index fdbd0b7..1d6584d 100644 --- a/nikola/plugins/command/install_plugin.py +++ b/nikola/plugins/command/install_plugin.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright © 2012-2013 Roberto Alsina and others. +# Copyright © 2012-2014 Roberto Alsina and others. # Permission is hereby granted, free of charge, to any # person obtaining a copy of this software and associated @@ -27,6 +27,7 @@ from __future__ import print_function import codecs import os +import sys import json import shutil import subprocess @@ -145,7 +146,6 @@ class CommandInstallPlugin(Command): shutil.copytree(plugin_path, dest_path) reqpath = os.path.join(dest_path, 'requirements.txt') - print(reqpath) if os.path.exists(reqpath): LOGGER.notice('This plugin has Python dependencies.') LOGGER.notice('Installing dependencies with pip...') @@ -180,6 +180,10 @@ class CommandInstallPlugin(Command): LOGGER.notice('This plugin has a sample config file.') print('Contents of the conf.py.sample file:\n') with codecs.open(confpypath, 'rb', 'utf-8') as fh: - print(indent(pygments.highlight( - fh.read(), PythonLexer(), TerminalFormatter()), 4 * ' ')) + if sys.platform == 'win32': + print(indent(pygments.highlight( + fh.read(), PythonLexer(), TerminalFormatter()), + 4 * ' ')) + else: + print(indent(fh.read(), 4 * ' ')) return True |
