aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-pygments/use-system-pygments-only.patch
blob: 6b4be8982006d30e1ef31544a7ee93da86e7a09b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Use only system-provided pygments and json module.

--- a/lib/pygments/mentos.py
+++ b/lib/pygments/mentos.py
@@ -6,13 +6,6 @@
 if 'PYGMENTS_PATH' in os.environ:
     sys.path.insert(0, os.environ['PYGMENTS_PATH'])
 
-dirname = os.path.dirname
-
-base_dir = dirname(dirname(dirname(os.path.abspath(__file__))))
-sys.path.append(base_dir + "/vendor")
-sys.path.append(base_dir + "/vendor/pygments-main")
-sys.path.append(base_dir + "/vendor/simplejson")
-
 import pygments
 from pygments import lexers, formatters, styles, filters
 
--- a/lib/pygments/popen.rb
+++ b/lib/pygments/popen.rb
@@ -24,7 +24,7 @@
     # Get things started by opening a pipe to mentos (the freshmaker), a
     # Python process that talks to the Pygments library. We'll talk back and
     # forth across this pipe.
-    def start(pygments_path = File.expand_path('../../../vendor/pygments-main/', __FILE__))
+    def start(pygments_path = '/usr/bin/pygmentize-2')
       begin
         @log = Logger.new(ENV['MENTOS_LOG'] ||= File::NULL)
         @log.level = Logger::INFO