blob: 4766d92266d9c9021561fcb61357faaf01518401 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Serial Port Support for Python"
2LICENSE = "BSD-3-Clause"
Andrew Geisslereef63862021-01-29 15:58:13 -06003LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=520e45e59fc2cf94aa53850f46b86436"
Andrew Geissler82c905d2020-04-13 13:39:40 -05004
Andrew Geisslereef63862021-01-29 15:58:13 -06005SRC_URI[sha256sum] = "3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb"
Andrew Geissler82c905d2020-04-13 13:39:40 -05006
7inherit pypi setuptools3 ptest
Brad Bishop6e60e8b2018-02-01 10:27:11 -05008
Patrick Williams213cb262021-08-07 19:21:33 -05009do_install:append() {
Andrew Geisslereef63862021-01-29 15:58:13 -060010 rm -f ${D}${bindir}/pyserial-miniterm
11 rm -f ${D}${bindir}/pyserial-ports
Brad Bishop6e60e8b2018-02-01 10:27:11 -050012 rmdir ${D}${bindir}
13}
Andrew Geissler82c905d2020-04-13 13:39:40 -050014
15PACKAGES =+ "${PN}-java ${PN}-osx ${PN}-win32 ${PN}-tools"
16
Patrick Williams213cb262021-08-07 19:21:33 -050017FILES:${PN}-java = " \
Andrew Geissler82c905d2020-04-13 13:39:40 -050018 ${PYTHON_SITEPACKAGES_DIR}/serial/*java* \
19 ${PYTHON_SITEPACKAGES_DIR}/serial/__pycache__/*java* \
20"
21
Patrick Williams213cb262021-08-07 19:21:33 -050022FILES:${PN}-osx = " \
Andrew Geissler82c905d2020-04-13 13:39:40 -050023 ${PYTHON_SITEPACKAGES_DIR}/serial/tools/*osx* \
24 ${PYTHON_SITEPACKAGES_DIR}/serial/tools/__pycache__/*osx* \
25"
26
Patrick Williams213cb262021-08-07 19:21:33 -050027FILES:${PN}-win32 = " \
Andrew Geissler82c905d2020-04-13 13:39:40 -050028 ${PYTHON_SITEPACKAGES_DIR}/serial/*serialcli* \
29 ${PYTHON_SITEPACKAGES_DIR}/serial/__pycache__/*serialcli* \
30 ${PYTHON_SITEPACKAGES_DIR}/serial/*win32* \
31 ${PYTHON_SITEPACKAGES_DIR}/serial/__pycache__/*win32* \
32 ${PYTHON_SITEPACKAGES_DIR}/serial/tools/miniterm* \
33 ${PYTHON_SITEPACKAGES_DIR}/serial/tools/__pycache__/miniterm* \
34 ${PYTHON_SITEPACKAGES_DIR}/serial/tools/*windows* \
35 ${PYTHON_SITEPACKAGES_DIR}/serial/tools/__pycache__/*windows* \
36"
37
Patrick Williams213cb262021-08-07 19:21:33 -050038RDEPENDS:${PN} = "\
Andrew Geissler82c905d2020-04-13 13:39:40 -050039 ${PYTHON_PN}-fcntl \
40 ${PYTHON_PN}-io \
41 ${PYTHON_PN}-logging \
42 ${PYTHON_PN}-netclient \
43 ${PYTHON_PN}-numbers \
44 ${PYTHON_PN}-shell \
45 ${PYTHON_PN}-stringold \
46 ${PYTHON_PN}-threading \
47"
48
49BBCLASSEXTEND = "native nativesdk"
50
51SRC_URI += " \
52 file://run-ptest \
53"
54
Patrick Williams213cb262021-08-07 19:21:33 -050055RDEPENDS:${PN}-ptest += " \
Andrew Geissler82c905d2020-04-13 13:39:40 -050056 ${PYTHON_PN}-pytest \
57"
58
59do_install_ptest() {
60 install -d ${D}${PTEST_PATH}/test
61 cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/
62}