| Brad Bishop | 65b40a8 | 2016-06-09 22:22:46 -0400 | [diff] [blame] | 1 | # In general this class should only be used by board layers | 
 | 2 | # that keep their machine-readable-workbook in the skeleton repository. | 
 | 3 |  | 
 | 4 | inherit allarch | 
 | 5 | inherit setuptools | 
| Brad Bishop | 382cb1b | 2016-06-15 22:01:33 -0400 | [diff] [blame] | 6 | inherit pythonnative | 
| Brad Bishop | 0e82c3c | 2016-07-06 13:12:48 -0400 | [diff] [blame] | 7 | inherit skeleton-rev | 
| Brad Bishop | 0e82c3c | 2016-07-06 13:12:48 -0400 | [diff] [blame] | 8 |  | 
 | 9 | HOMEPAGE = "http://github.com/openbmc/skeleton" | 
| Brad Bishop | 65b40a8 | 2016-06-09 22:22:46 -0400 | [diff] [blame] | 10 |  | 
| Matt Spinler | 3931483 | 2016-09-13 16:20:01 -0500 | [diff] [blame] | 11 | PROVIDES += "virtual/obmc-inventory-data" | 
 | 12 | RPROVIDES_${PN} += "virtual-obmc-inventory-data" | 
 | 13 |  | 
| Brad Bishop | 382cb1b | 2016-06-15 22:01:33 -0400 | [diff] [blame] | 14 | DEPENDS += "python" | 
| Patrick Venture | 9a368c5 | 2018-11-06 08:35:16 -0800 | [diff] [blame] | 15 | SRC_URI += "${SKELETON_URI};" | 
 | 16 | S = "${WORKDIR}/git/configs" | 
| Brad Bishop | 65b40a8 | 2016-06-09 22:22:46 -0400 | [diff] [blame] | 17 |  | 
 | 18 | python() { | 
| Brad Bishop | c12fd7d | 2019-02-04 16:16:59 -0500 | [diff] [blame] | 19 |     machine = d.getVar('MACHINE', True).capitalize() + '.py' | 
 | 20 |     d.setVar('_config_in_skeleton', machine) | 
| Brad Bishop | 65b40a8 | 2016-06-09 22:22:46 -0400 | [diff] [blame] | 21 | } | 
 | 22 |  | 
 | 23 | do_make_setup() { | 
 | 24 |         cp ${S}/${_config_in_skeleton} \ | 
 | 25 |                 ${S}/obmc_system_config.py | 
 | 26 |         cat <<EOF > ${S}/setup.py | 
 | 27 | from distutils.core import setup | 
 | 28 |  | 
 | 29 | setup(name='${BPN}', | 
 | 30 |     version='${PR}', | 
 | 31 |     py_modules=['obmc_system_config'], | 
 | 32 |     ) | 
 | 33 | EOF | 
 | 34 | } | 
 | 35 |  | 
 | 36 | addtask make_setup after do_patch before do_configure |