This file is indexed.

/usr/lib/python2.7/dist-packages/sardana/requirements.py is in python-sardana 1.2.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/usr/bin/env python

##############################################################################
##
## This file is part of Sardana
##
## http://www.tango-controls.org/static/sardana/latest/doc/html/index.html
##
## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
## 
## Sardana is free software: you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
## 
## Sardana is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Lesser General Public License for more details.
## 
## You should have received a copy of the GNU Lesser General Public License
## along with Sardana.  If not, see <http://www.gnu.org/licenses/>.
##
##############################################################################

""" """

__docformat__ = 'restructuredtext'

__all__ = ["check_requirements"]

import sys

__requires__ = {
#     module        minimum
    "Python"      : (2,6,0),
    "PyTango"     : (7,2,3),
    "taurus.core" : (3,1,0),
}

def check_requirements(exec_name=None):
    
    if exec_name is None:
        exec_name = sys.argv[0]
    
    pyver_ = __requires__['Python']
    pytangover_ = __requires__['PyTango']
    taurusver_ = __requires__['taurus.core']

    pyver_str_ = ".".join(map(str, pyver_))
    pytangover_str_ = ".".join(map(str, pytangover_))
    taurusver_str_ = ".".join(map(str,taurusver_))
    
    pyver = sys.version_info[:3]
    pyver_str = ".".join(map(str,pyver))

    if pyver < pyver_:
        print "Sardana requires python %s. Installed version is %s" % (pyver_str_, pyver_str)
        sys.exit(-1)
    
    pytangover = None
    try:
        import PyTango
        pytangover = PyTango.Release.version_info[:3]
    except ImportError:
        pass
    except:
        pytangover = tuple(map(int, PyTango.__version__.split('.', 3)))

    if pytangover is None:
        print "%s requires PyTango %s. No version installed" % (exec_name, pytangover_str_,)
        sys.exit(-1)
    if pytangover < pytangover_:
        pytangover_str = ".".join(map(str,pytangover))
        print "%s requires PyTango %s. Installed version is %s" % (exec_name, pytangover_str_, pytangover_str)
        sys.exit(-1)
    
    taurusver = None
    try:
        import taurus
        taurusver = taurus.Release.version_info[:3]
    except ImportError:
        pass
    except:
        taurusver = tuple(map(int, taurus.Release.version.split('.', 3)))

    if taurusver is None:
        print "%s requires taurus %s. No version installed" % (exec_name, taurusver_str_,)
        sys.exit(-1)
    if taurusver < taurusver_:
        taurusver_str = ".".join(map(str,taurusver))
        print "%s requires taurus %s. Installed version is %s" % (exec_name, taurusver_str_, taurusver_str)
        sys.exit(-1)
    
    try:
        from lxml import etree
    except:
        print "Could not find any suitable XML library"
        sys.exit(-1)