blob: 84172c058eb9517f4dbdb5552a910437525bb822 [file] [log] [blame]
Andrew Geissler69721092021-07-23 12:57:00 -04001# Copyright (C) 2021 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4SUMMARY = "Get CPU info with pure Python 2 & 3"
5HOMEPAGE = "https://github.com/workhorsy/py-cpuinfo"
6LICENSE = "MIT"
Patrick Williams2390b1b2022-11-03 13:47:49 -05007LIC_FILES_CHKSUM = "file://LICENSE;md5=d2379ecb0d7a8299101b1e4c160cd1f7"
Andrew Geissler69721092021-07-23 12:57:00 -04008
Patrick Williams2390b1b2022-11-03 13:47:49 -05009SRC_URI[sha256sum] = "3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690"
Andrew Geissler69721092021-07-23 12:57:00 -040010
11inherit ptest pypi setuptools3
12
13SRC_URI += "file://run-ptest \
Patrick Williamsac13d5f2023-11-24 18:59:46 -060014 file://0001-test_cli.py-disable.patch \
Andrew Geissler69721092021-07-23 12:57:00 -040015 "
16
Patrick Williamsac13d5f2023-11-24 18:59:46 -060017do_install:append() {
18 # Make sure we use /usr/bin/env python3
19 for PYTHSCRIPT in `grep -rIl '^#!.*python' ${D}`; do
20 sed -i -e '1s|^#!.*|#!/usr/bin/env ${PYTHON_PN}|' $PYTHSCRIPT
21 done
22}
23
Andrew Geissler69721092021-07-23 12:57:00 -040024do_install_ptest() {
25 install -d ${D}${PTEST_PATH}/tests
26 cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
27}
28
Patrick Williams213cb262021-08-07 19:21:33 -050029RDEPENDS:${PN}-ptest += "\
Andrew Geissler69721092021-07-23 12:57:00 -040030 python3-pytest \
31"
32
Patrick Williams213cb262021-08-07 19:21:33 -050033RDEPENDS:${PN} += "python3-core python3-ctypes python3-datetime python3-json python3-io python3-mmap python3-multiprocessing python3-netclient python3-pickle python3-pprint python3-shell"
Andrew Geissler69721092021-07-23 12:57:00 -040034
35BBCLASSEXTEND = "native nativesdk"