File: get_pylib.py

package info (click to toggle)
rt-tests 2.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: ansic: 13,273; python: 495; makefile: 237; sh: 158
file content (16 lines) | stat: -rwxr-xr-x 425 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python3

# This file is used during the make process

import sysconfig

# Older versions of python don't have this scheme
# but produce the answer we expect with 'posix_prefix'
# Newer versions of python insert 'local' in the path unless we use rpm_prefix
SCHEME = 'rpm_prefix'

if not SCHEME in sysconfig.get_scheme_names():
    SCHEME = 'posix_prefix'

PYLIB = sysconfig.get_path('purelib', SCHEME)
print(PYLIB)