blob: b767537244ac34da8d30a57e94be1ff3992c75fb [file] [log] [blame]
Brad Bishopf5af3fe2016-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 Bishop0a277312016-06-15 22:01:33 -04006inherit pythonnative
Brad Bishop73994862016-07-06 13:12:48 -04007inherit skeleton-rev
Brad Bishop73994862016-07-06 13:12:48 -04008
9HOMEPAGE = "http://github.com/openbmc/skeleton"
Brad Bishopf5af3fe2016-06-09 22:22:46 -040010
Matt Spinler6f5fba12016-09-13 16:20:01 -050011PROVIDES += "virtual/obmc-inventory-data"
12RPROVIDES_${PN} += "virtual-obmc-inventory-data"
13
Brad Bishop0a277312016-06-15 22:01:33 -040014DEPENDS += "python"
Patrick Venture88618662018-11-06 08:35:16 -080015SRC_URI += "${SKELETON_URI};"
16S = "${WORKDIR}/git/configs"
Brad Bishopf5af3fe2016-06-09 22:22:46 -040017
18python() {
Brad Bishopdbd30612019-02-04 16:16:59 -050019 machine = d.getVar('MACHINE', True).capitalize() + '.py'
20 d.setVar('_config_in_skeleton', machine)
Brad Bishopf5af3fe2016-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