File: api_v2_client.in

package info (click to toggle)
pcs 0.12.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,148 kB
  • sloc: python: 238,810; xml: 20,833; ruby: 13,203; makefile: 1,595; sh: 484
file content (20 lines) | stat: -rw-r--r-- 523 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!@PYTHON@
import os.path
import sys

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

TEST_INSTALLED = os.environ.get("PCS_TEST.TEST_INSTALLED", "0") == "1"

if TEST_INSTALLED:
    BUNDLED_PACKAGES_DIR = os.path.join("@PCS_BUNDLED_DIR@", "packages")
else:
    PACKAGE_DIR = os.path.dirname(CURRENT_DIR)
    sys.path.insert(0, PACKAGE_DIR)
    BUNDLED_PACKAGES_DIR = os.path.join(PACKAGE_DIR, "@PCS_BUNDLED_DIR_LOCAL@", "packages")

sys.path.insert(0, BUNDLED_PACKAGES_DIR)

from api_v2_client import main

main()