Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 1 | # Copyright (C) 2021 Khem Raj <raj.khem@gmail.com> |
| 2 | # Released under the MIT license (see COPYING.MIT for the terms) |
| 3 | |
| 4 | SUMMARY = "Get CPU info with pure Python 2 & 3" |
| 5 | HOMEPAGE = "https://github.com/workhorsy/py-cpuinfo" |
| 6 | LICENSE = "MIT" |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d2379ecb0d7a8299101b1e4c160cd1f7" |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 8 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 9 | SRC_URI[sha256sum] = "3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690" |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 10 | |
| 11 | inherit ptest pypi setuptools3 |
| 12 | |
| 13 | SRC_URI += "file://run-ptest \ |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 14 | file://0001-test_cli.py-disable.patch \ |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 15 | " |
| 16 | |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 17 | do_install:append() { |
| 18 | # Make sure we use /usr/bin/env python3 |
| 19 | for PYTHSCRIPT in `grep -rIl '^#!.*python' ${D}`; do |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame^] | 20 | sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 21 | done |
| 22 | } |
| 23 | |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 24 | do_install_ptest() { |
| 25 | install -d ${D}${PTEST_PATH}/tests |
| 26 | cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ |
| 27 | } |
| 28 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 29 | RDEPENDS:${PN}-ptest += "\ |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 30 | python3-pytest \ |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame^] | 31 | python3-unittest-automake-output \ |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 32 | " |
| 33 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 34 | RDEPENDS:${PN} += "python3-core python3-ctypes python3-datetime python3-json python3-io python3-mmap python3-multiprocessing python3-netclient python3-pickle python3-pprint python3-shell" |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 35 | |
| 36 | BBCLASSEXTEND = "native nativesdk" |