~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to build_files/scons/config/Modules/FindPython.py

  • Committer: Reinhard Tartler
  • Date: 2014-05-31 01:50:05 UTC
  • mfrom: (14.2.27 sid)
  • Revision ID: siretart@tauware.de-20140531015005-ml6druahuj82nsav
mergeĀ fromĀ debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import os
 
2
import platform
2
3
 
3
4
def FindPython():
4
5
    all_abi_flags = ['m', 'mu', '']
7
8
    abi_flags = "m"  # Most common for linux distros
8
9
    version = "3.3"
9
10
 
10
 
    _arch = "x86_64-linux-gnu"
 
11
    _arch = platform.uname()[4] + "-linux-gnu"
11
12
 
12
13
    # Determine ABI flags used on this system
13
14
    include = os.path.join(python, "include")
37
38
    _libpath_arch = os.path.join(python, "lib", _arch)  # No lib64 stuff with recent deb-like distro afaik...
38
39
    _libs = ["libpython" + version + abi_flags + ext for ext in (".so", ".a")]
39
40
    for l in _libs:
40
 
        print os.path.join(libpath, l), os.path.exists(os.path.join(libpath, l))
41
 
        print os.path.join(_libpath_arch, l), os.path.exists(os.path.join(_libpath_arch, l))
42
41
        if not os.path.exists(os.path.join(libpath, l)) and os.path.exists(os.path.join(_libpath_arch, l)):
43
42
            libpath_arch = os.path.join(libpath, _arch)
44
43
            break