blob: b767537244ac34da8d30a57e94be1ff3992c75fb [file] [log] [blame]
Brad Bishop65b40a82016-06-09 22:22:46 -04001# In general this class should only be used by board layers
2# that keep their machine-readable-workbook in the skeleton repository.
3
4inherit allarch
5inherit setuptools
Brad Bishop382cb1b2016-06-15 22:01:33 -04006inherit pythonnative
Brad Bishop0e82c3c2016-07-06 13:12:48 -04007inherit skeleton-rev
Brad Bishop0e82c3c2016-07-06 13:12:48 -04008
9HOMEPAGE = "http://github.com/openbmc/skeleton"
Brad Bishop65b40a82016-06-09 22:22:46 -040010
Matt Spinler39314832016-09-13 16:20:01 -050011PROVIDES += "virtual/obmc-inventory-data"
12RPROVIDES_${PN} += "virtual-obmc-inventory-data"
13
Brad Bishop382cb1b2016-06-15 22:01:33 -040014DEPENDS += "python"
Patrick Venture9a368c52018-11-06 08:35:16 -080015SRC_URI += "${SKELETON_URI};"
16S = "${WORKDIR}/git/configs"
Brad Bishop65b40a82016-06-09 22:22:46 -040017
18python() {
Brad Bishopc12fd7d2019-02-04 16:16:59 -050019 machine = d.getVar('MACHINE', True).capitalize() + '.py'
20 d.setVar('_config_in_skeleton', machine)
Brad Bishop65b40a82016-06-09 22:22:46 -040021}
22
23do_make_setup() {
24 cp ${S}/${_config_in_skeleton} \
25 ${S}/obmc_system_config.py
26 cat <<EOF > ${S}/setup.py
27from distutils.core import setup
28
29setup(name='${BPN}',
30 version='${PR}',
31 py_modules=['obmc_system_config'],
32 )
33EOF
34}
35
36addtask make_setup after do_patch before do_configure