SRC_URI在Bitabake配方中不起作用 [英] SRC_URI not working in bitabake recipe

查看:229
本文介绍了SRC_URI在Bitabake配方中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个位烘烤食谱,用于安装 https://pypi.python. org/pypi/Adafruit-GPIO/1.0.3 python软件包.以下是我的食谱

I created a bitbake recipe for installing https://pypi.python.org/pypi/Adafruit-GPIO/1.0.3 python package. Following is my recipe

DESCRIPTION = "Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries"
SECTION = "devel/python"
LICENSE = "CLOSED"

PR = "r1"

SRC_URI = "https://pypi.python.org/packages/db/1c/2dc8a674514219f287fa344e44cadfd77b3e2878d6ff602a8c2149b50dd8/Adafruit_GPIO-1.0.3.tar.gz"

inherit pypi setuptools

do_install_append() {
  rm -f ${D}${libdir}/python*/site-packages/site.py*
}

do_compile_prepend() {
    ${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_BUILD_ARGS} || \
    true
}
SRC_URI[md5sum] = "dfcdb1ba90188d18ba80b6d2958c8c33"

但是,每当我尝试烘烤食谱时,我总是会收到以下错误消息

But whenever I try to bitbake recipe I always receive following error

ERROR: Function failed: Fetcher failure for URL: 'https://pypi.python.org/packages/source/A/Adafruit-GPIO/Adafruit-GPIO-1.0.3.tar.gz'. Unable to fetch URL from any source

我的问题是,为什么我在SRC_URI中有其他链接时,bitbake尝试从其他链接下载?我该如何纠正我的食谱>

My question why does bitbake tries to download from some other link while I have some other link in SRC_URI? How can I correct my recipe>

推荐答案

pypi.bbclass指定了另一个下载URL.

It's pypi.bbclass that specifies another download URL.

所以

  • 删除inherit pypi

  • 删除您的SRC_URI.在这种情况下,您还需要在pypi中将PYPI_PACKAGE = "Adafruit-GPIO"设置为正确的软件包名称(因为您的配方名称中使用的是-而不是_).
  • remove your SRC_URI. In this case, you will also need to set PYPI_PACKAGE = "Adafruit-GPIO" to the correct package name in pypi (as your recipe has a - instead of a _ in its name).

请参见 pypi.bbclass

至少在我的系统上构建的未经测试的食谱版本为adafruit-gpio_1.0.3.bb(请注意,食谱名称中仅使用小写字母):

An untested version of your recipe that at least builds on my system is adafruit-gpio_1.0.3.bb (note, only lowercase letters in the recipe name):

DERIPTION = "Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=e41c52dbe1b96447d1c50129a124f586"

SRC_URI[md5sum] = "dfcdb1ba90188d18ba80b6d2958c8c33"
SRC_URI[sha256sum] = "d6465b92c866c51ca8f3bc1e8f2ec36f5ccdb46d0fd54101c1109756d4a2dcd0"

PYPI_PACKAGE = "Adafruit_GPIO"
inherit pypi setuptools

这篇关于SRC_URI在Bitabake配方中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆