Brad Bishop | f5af3fe | 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 | 0a27731 | 2016-06-15 22:01:33 -0400 | [diff] [blame] | 6 | inherit pythonnative |
Brad Bishop | 7399486 | 2016-07-06 13:12:48 -0400 | [diff] [blame] | 7 | inherit skeleton-rev |
Brad Bishop | 7399486 | 2016-07-06 13:12:48 -0400 | [diff] [blame] | 8 | |
| 9 | HOMEPAGE = "http://github.com/openbmc/skeleton" |
Brad Bishop | f5af3fe | 2016-06-09 22:22:46 -0400 | [diff] [blame] | 10 | |
Matt Spinler | 6f5fba1 | 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 | 0a27731 | 2016-06-15 22:01:33 -0400 | [diff] [blame] | 14 | DEPENDS += "python" |
Patrick Venture | 8861866 | 2018-11-06 08:35:16 -0800 | [diff] [blame] | 15 | SRC_URI += "${SKELETON_URI};" |
| 16 | S = "${WORKDIR}/git/configs" |
Brad Bishop | f5af3fe | 2016-06-09 22:22:46 -0400 | [diff] [blame] | 17 | |
| 18 | python() { |
Brad Bishop | dbd3061 | 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 | f5af3fe | 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 |