Package: ruby-pygments.rb / 1.2.0-4

0002-Don-t-set-PYGMENTS_PATH-and-remove-sys.path-appends.patch Patch series | download
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From: Debian Ruby Extras Maintainers
 <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
Date: Fri, 29 Sep 2017 22:48:27 +0200
Subject: Don-t-set-PYGMENTS_PATH-and-remove-sys.path-appends

---
 lib/pygments/mentos.py | 15 ++++++++-------
 lib/pygments/popen.rb  |  5 +++--
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/lib/pygments/mentos.py b/lib/pygments/mentos.py
index c0d6e88..7ee74a9 100755
--- a/lib/pygments/mentos.py
+++ b/lib/pygments/mentos.py
@@ -3,15 +3,16 @@
 
 import sys, re, os, signal
 import traceback
-if 'PYGMENTS_PATH' in os.environ:
-    sys.path.insert(0, os.environ['PYGMENTS_PATH'])
+# in debian we have everything we need installed
+#if 'PYGMENTS_PATH' in os.environ:
+#    sys.path.insert(0, os.environ['PYGMENTS_PATH'])
 
-dirname = os.path.dirname
+#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")
+#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
diff --git a/lib/pygments/popen.rb b/lib/pygments/popen.rb
index 59942a7..298842e 100644
--- a/lib/pygments/popen.rb
+++ b/lib/pygments/popen.rb
@@ -24,7 +24,7 @@ module Pygments
     # 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 = File.expand_path('../../../vendor/pygments-main/', __FILE__))
       begin
         @log = Logger.new(ENV['MENTOS_LOG'] ||= File::NULL)
         @log.level = Logger::INFO
@@ -33,7 +33,8 @@ module Pygments
         @log = Logger.new(File::NULL)
       end
 
-      ENV['PYGMENTS_PATH'] = pygments_path
+      # in debian we have python-pygments installed
+      #ENV['PYGMENTS_PATH'] = pygments_path
 
       # Make sure we kill off the child when we're done
       at_exit { stop "Exiting" }