aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/plugins/command/install_plugin.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2014-02-28 08:49:41 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2014-02-28 08:49:41 -0300
commit0f1e24f7888ba16fe5629c57fd00f0deacb63e5e (patch)
tree7153a3a11b766f375b1d1c0a7adc599e0a9f9c55 /nikola/plugins/command/install_plugin.py
parent04fc43563d3d5d4218004690b5e14c19c67bdcbc (diff)
parent2828399ba5cbb14502b023d4de1ba02f13dd5055 (diff)
Merge tag 'upstream/6.3.0'
Upstream version 6.3.0
Diffstat (limited to 'nikola/plugins/command/install_plugin.py')
-rw-r--r--nikola/plugins/command/install_plugin.py12
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