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