2017-08-17 50 views
2

我創建了一個bitbake配方,用於安裝https://pypi.python.org/pypi/Adafruit-GPIO/1.0.3 python軟件包。以下是我的食譜SRC_URI不工作在bitabake配方

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" 

但每當我試圖BitBake的食譜,我總是收到以下錯誤

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 

我的問題爲什麼bitbake的嘗試從其他一些鏈接下載,而我在SRC_URI其他一些鏈接?我該如何糾正我的食譜>

回答

4

這是pypi.bbclass指定另一個下載URL。

因此,無論

  • 刪除inherit pypi

  • 刪除您SRC_URI。在這種情況下,您還需要在pypi中將PYPI_PACKAGE = "Adafruit-GPIO"設置爲正確的包名稱(因爲您的配方名稱中包含-而不是_)。

pypi.bbclass

你的食譜中的未經測試的版本,至少建立在我的系統是adafruit-gpio_1.0.3.bb(注意,在配方名存實亡小寫字母):

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 
+0

謝謝您的回答。還有一個問題,我如何才能找到正確的軟件包名稱。例如,https://pypi.python.org/pypi/Adafruit-ADS1x15/1.0.2爲此,我正在使用PYPI_PACKAGE =「Adafruit-ADS1x15」,但ut顯示fetcg錯誤。即使PYPI_PACKAGE =「Adafruit_ADS1x15」在這種情況下也不起作用。 – prattom

+0

你不會告訴我哪裏出了問題。不過,我剛剛修改了您的示例,至少爲我打造。看到我編輯的答案。 – Anders

+0

謝謝,我現在明白我犯了什麼錯誤 – prattom