1 | #! /@unixroot/usr/bin/python
|
---|
2 |
|
---|
3 |
|
---|
4 | import os
|
---|
5 | import re
|
---|
6 | import subprocess
|
---|
7 | import sys
|
---|
8 | import platform
|
---|
9 |
|
---|
10 | package = 'poppler-qt4'
|
---|
11 | cmd = ['pkg-config']
|
---|
12 | cmd += ['--cflags', '--libs']
|
---|
13 | cmd.append(package)
|
---|
14 | sys.stderr.write("bww trace executed cmd: %s\n" % cmd)
|
---|
15 | try:
|
---|
16 | output = subprocess.check_output(cmd)
|
---|
17 | sys.stderr.write("bww trace output1: %s\n" % output)
|
---|
18 | output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
|
---|
19 | sys.stderr.write("bww trace output2: %s\n" % output)
|
---|
20 | except OSError:
|
---|
21 | sys.stderr.write("Can't determine package of %s\n" % package)
|
---|
22 |
|
---|
23 | cmd = ['pkg-config', '--modversion', package]
|
---|
24 | try:
|
---|
25 | output = subprocess.check_output(cmd)
|
---|
26 | sys.stderr.write("bww trace output3: %s\n" % output)
|
---|
27 | output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
|
---|
28 | sys.stderr.write("bww trace output4: %s\n" % output)
|
---|
29 | except OSError:
|
---|
30 | sys.stderr.write("Can't determine version of %s\n" % package)
|
---|
31 |
|
---|