python 如何添加/安装pygame到树莓派4上的Yocto项目?

wz1wpwve  于 2023-01-04  发布在  Python
关注(0)|答案(1)|浏览(274)

你怎么能把pygame安装到你的yocto项目中呢?只能找到一些看起来不起作用的老解决方案。我设法安装python3没有任何问题,但是meta-python层并不包含pygame作为标准。你怎么能创建你自己的层/配方来得到pygame呢?
尝试从脚本here创建我自己的配方,但当我使用bitbake add-layer <PATH>时,我得到一个错误消息:Specified layer directory <PATH> doesn't contain a conf/layer.conf file

SUMMARY = "Python Game Development"
HOMEPAGE = "https://www.pygame.org"
AUTHOR = "A community project. <pygame@pygame.org>"
LICENSE = "LGPL-2.0"
LIC_FILES_CHKSUM = "file://setup.py;md5=59f9a291287e87473bbb98f2c9291c5c"

SRC_URI = "https://files.pythonhosted.org/packages/9a/50/67767e5586a45e7e7b02e6f0e07853f8fcb81b54c66db6278f1a1344491f/pygame-2.1.2.tar.gz"
SRC_URI[md5sum] = "8467a125e9075fa701f082806d228366"
SRC_URI[sha256sum] = "d6d0eca28f886f0477cd0721ac688189155a587f2bb8eae740e52ca56c3ad23c"

S = "${WORKDIR}/pygame-2.1.2"

RDEPENDS_${PN} = ""

inherit setuptools3

其他文件的外观。local.conf:

MACHINE ??= "raspberrypi4-64"
RASPBERRYPI_DISPLAY = " 1"
IMAGE_INSTALL:append = " python3"
IMAGE_FSTYPES = "wic wic.bmap"

bblayer.配置文件:

<PATH>/poky/meta \
  <PATH>/poky/meta-poky \
  <PATH>/poky/meta-yocto-bsp \
  <PATH>/meta-openembedded/meta-oe \
  <PATH>/meta-openembedded/meta-python \
  <PATH>/meta-raspberrypi \
cbeh67ev

cbeh67ev1#

你有没有把pygame添加到Yocto中?我也在努力实现同样的目标。
我也尝试过用pipoe生成一个菜谱(没有创建自定义层,我已经把菜谱添加到 ../sources/poky/ meta/recipes-devtools/python 中),菜谱解析成功,但是编译失败。
这是我的python3-pygame_2.1.3.dev8.bb:

SUMMARY = "Python Game Development"
HOMEPAGE = "https://www.pygame.org"
AUTHOR = "A community project. <pygame@pygame.org>"
LICENSE = "LGPL-2.0"
LIC_FILES_CHKSUM = "file://setup.py;md5=f28719c8b1d7e19071bd25e2f3a54c06"

SRC_URI = "https://files.pythonhosted.org/packages/f0/34/fc13b596b637cc59961ed606447a27a96d31bfda3ca965b73ebd16a02750/pygame-2.1.3.dev8.tar.gz"
SRC_URI[md5sum] = "6cf32b59a453b9824f421065a0205b52"
SRC_URI[sha256sum] = "94d98328e73d56be35cc3ae8e31f9d95fbce4f3dca6a74f05c58f4c5ef18c33d"

S = "${WORKDIR}/pygame-2.1.3.dev8"

RDEPENDS_${PN} = "libsdl2"

inherit setuptools3

相关问题