[DRE-commits] [ruby-pygments.rb] 07/09: Invoke mentos directly on GNU/Linux

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 711e7d779fbc6dde9522a44e619750a17c564c7a
Author: Per Andersson <avtobiff at gmail.com>
Date:   Wed Apr 2 23:30:58 2014 +0200

    Invoke mentos directly on GNU/Linux
    
    Invoking the script on GNU/Linux by passing it as an argument to
    python(2) makes the process use 100% CPU for about tens of seconds when
    it is supposed to timeout (test_returns_nil_on_timeout reproduces this).
    
    On current Debian Sid python2 exists, so this can be used in mentos.py
    shebang.
    
    Brought back script invocation for windows.
    
    This is forwarded upstream https://github.com/tmm1/pygments.rb/pull/119
    
    Gbp-Pq: Name 0006-Invoke-mentos-directly-on-GNU-Linux.patch
---
 lib/pygments/popen.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/pygments/popen.rb b/lib/pygments/popen.rb
index a0ed512..56544f4 100644
--- a/lib/pygments/popen.rb
+++ b/lib/pygments/popen.rb
@@ -41,7 +41,8 @@ module Pygments
 
       # A pipe to the mentos python process. #popen4 gives us
       # the pid and three IO objects to write and read.
-      script = "#{python_binary} #{File.expand_path('../mentos.py', __FILE__)}"
+      script = "#{File.expand_path('../mentos.py', __FILE__)}"
+      script = "#{python_binary} "  + script if windows?
       @pid, @in, @out, @err = popen4(script)
       @log.info "Starting pid #{@pid} with fd #{@out.to_i} and python #{python_binary}."
     end

-- 
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