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 |
| 8 | inherit obmc-phosphor-license |
| 9 | |
| 10 | HOMEPAGE = "http://github.com/openbmc/skeleton" |
Brad Bishop | 65b40a8 | 2016-06-09 22:22:46 -0400 | [diff] [blame] | 11 | |
Brad Bishop | 382cb1b | 2016-06-15 22:01:33 -0400 | [diff] [blame] | 12 | DEPENDS += "python" |
Brad Bishop | 0e82c3c | 2016-07-06 13:12:48 -0400 | [diff] [blame] | 13 | SRC_URI += "${SKELETON_URI};subpath=configs" |
Brad Bishop | 65b40a8 | 2016-06-09 22:22:46 -0400 | [diff] [blame] | 14 | S = "${WORKDIR}/configs" |
| 15 | |
| 16 | python() { |
| 17 | machine = d.getVar('MACHINE', True).capitalize() + '.py' |
| 18 | d.setVar('_config_in_skeleton', machine) |
| 19 | } |
| 20 | |
| 21 | do_make_setup() { |
| 22 | cp ${S}/${_config_in_skeleton} \ |
| 23 | ${S}/obmc_system_config.py |
| 24 | cat <<EOF > ${S}/setup.py |
| 25 | from distutils.core import setup |
| 26 | |
| 27 | setup(name='${BPN}', |
| 28 | version='${PR}', |
| 29 | py_modules=['obmc_system_config'], |
| 30 | ) |
| 31 | EOF |
| 32 | } |
| 33 | |
| 34 | addtask make_setup after do_patch before do_configure |