Merge branch 'org.openembedded.dev' of git@git.openembedded.net:/openembedded into...
[vuplus_openembedded] / classes / distutils-base.bbclass
1 EXTRA_OEMAKE = ""
2 DEPENDS  += "${@["python-native python", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}"
3 RDEPENDS += "python-core"
4
5 export STAGING_INCDIR
6 export STAGING_LIBDIR
7
8 def python_dir(d):
9         import os, bb
10         staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 )
11         for majmin in "2.6 2.5 2.4 2.3".split():
12                 if os.path.exists( "%s/python%s" % ( staging_incdir, majmin ) ): return "python%s" % majmin
13         raise "No Python in STAGING_INCDIR. Forgot to build python-native ?"
14
15 PYTHON_DIR = "${@python_dir(d)}"
16
17 PACKAGES = "${PN}-dev ${PN}-dbg ${PN}-doc ${PN}"
18
19 FILES_${PN} = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*"
20
21 FILES_${PN}-dev += "\
22   ${libdir}/pkgconfig \
23   ${libdir}/${PYTHON_DIR}/site-packages/*.la \
24 "
25 FILES_${PN}-dbg = "\
26   ${libdir}/${PYTHON_DIR}/site-packages/.debug \
27   ${libdir}/${PYTHON_DIR}/site-packages/*/.debug \
28   ${libdir}/${PYTHON_DIR}/site-packages/*/*/.debug \
29 "