[DRE-commits] [ruby-pygments.rb] 03/09: Don-t-set-PYGMENTS_PATH-and-remove-sys.path-appends
Cédric Boutillier
boutil at moszumanska.debian.org
Sun Nov 26 21:11:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch patch-queue/master
in repository ruby-pygments.rb.
commit f36b3856bc5a058ff766da484a47e6f7c7be03c0
Author: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
Date: Fri Sep 29 22:48:27 2017 +0200
Don-t-set-PYGMENTS_PATH-and-remove-sys.path-appends
Gbp-Pq: Name 0002-Don-t-set-PYGMENTS_PATH-and-remove-sys.path-appends.patch
---
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" }
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-pygments.rb.git
More information about the Pkg-ruby-extras-commits
mailing list