File: FindLibPython.py

package info (click to toggle)
sigil 2.4.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 35,928 kB
  • sloc: cpp: 78,479; python: 61,153; ansic: 31,743; javascript: 188; sh: 37; makefile: 21
file content (25 lines) | stat: -rw-r--r-- 1,120 bytes parent folder | download | duplicates (8)
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
# Note by Nikolaus Demmel 28.03.2014: My contributions are licensend under the
# same as CMake (BSD). My adaptations are in part based
# https://github.com/qgis/QGIS/tree/master/cmake which has the following
# copyright note:

# FindLibPython.py
# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

import sys
import distutils.sysconfig

print("exec_prefix:%s" % sys.exec_prefix)
print("major_version:%s" % str(sys.version_info[0]))
print("minor_version:%s" % str(sys.version_info[1]))
print("patch_version:%s" % str(sys.version_info[2]))
print("short_version:%s" % '.'.join(map(lambda x:str(x), sys.version_info[0:2])))
print("long_version:%s" % '.'.join(map(lambda x:str(x), sys.version_info[0:3])))
print("py_inc_dir:%s" % distutils.sysconfig.get_python_inc())
print("site_packages_dir:%s" % distutils.sysconfig.get_python_lib(plat_specific=1))
for e in distutils.sysconfig.get_config_vars ('LIBDIR'):
    if e != None:
        print("py_lib_dir:%s" % e)
        break