File: pathutils.py

package info (click to toggle)
python-pysaml2 3.0.0-5%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 27,672 kB
  • sloc: xml: 228,756; python: 62,815; makefile: 168; sh: 104
file content (24 lines) | stat: -rw-r--r-- 493 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os.path

BASEDIR = os.path.abspath(os.path.dirname(__file__))


def full_path(local_file):
    return os.path.join(BASEDIR, local_file)


def dotname(module):
    if not BASEDIR.endswith('tests'):
        return 'tests.' + module
    else:
        return module

try:
    from saml2.sigver import get_xmlsec_binary
except ImportError:
    get_xmlsec_binary = None

if get_xmlsec_binary:
    xmlsec_path = get_xmlsec_binary(["/opt/local/bin"])
else:
    xmlsec_path = '/usr/bin/xmlsec1'