Not sure is this is the right place to ask this:
I've been struggling with trying to create a recipe to compile python-cffi for the dora branch of bitbake and have had no luck yet. There seems to be several recipes out there but non work for me. Apparently the source code gz file is in a weird state and is not fetchable through the normal do_fetch command in bitbake.
When using these bitbake recipes as starting points:
and
I modified the code to create a new recipe called python-cffi_1.11.2.bb, then the standard do_fetch doesn't not understand how to handle the downloaded gz file.
This is the bitbake recipe I'm using (named python-cffi_1.11.2.bb)
SUMMARY = "Foreign Function Interface for Python calling C code"
# This is the format of the actual URI
SRC_URI = "https://pypi.python.org/packages/c9/70/89b68b6600d479034276fed316e14b9107d50a62f5627da37fafe083fde3/cffi-1.11.2.tar.gz#md5=a731487324b501c8295221b629d3f5f3"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5677e2fdbf7cdda61d6dd2b57df547bf"
DEPENDS += "libffi python-pycparser"
SRC_URI[md5sum] = "a731487324b501c8295221b629d3f5f3"
RDEPENDS_${PN}_class-target = "python-io "
BBCLASSEXTEND = "native nativesdk"
inherit pypi setuptools
And I get this set of error messages in build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/python-cffi/1.11.2-r0/temp/log.do_fetch
Apparently the fetcher gets the file downloaded correctly but then doesn't know what to do with it. The build/downloads directory has the file cffi-1.11.2.tar.gz!
...
DEBUG: Trying Upstream
NOTE: fetch https://pypi.python.org/packages/c9/70/89b68b6600d479034276fed316e14b9107d50a62f5627da37fafe083fde3/cffi-1.11.2.tar.gz#md5=a731487324b501c8295221b629d3f5f3
DEBUG: executing /usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P /home/pjm/yocto-iscan/poky/build/downloads 'https://pypi.python.org/packages/c9/70/89b68b6600d479034276fed316e14b9107d50a62f5627da37fafe083fde3/cffi-1.11.2.tar.gz#md5=a731487324b501c8295221b629d3f5f3'
DEBUG: Fetcher accessed the network with the command /usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P /home/pjm/yocto-iscan/poky/build/downloads 'https://pypi.python.org/packages/c9/70/89b68b6600d479034276fed316e14b9107d50a62f5627da37fafe083fde3/cffi-1.11.2.tar.gz#md5=a731487324b501c8295221b629d3f5f3'
DEBUG: Running export SSH_AUTH_SOCK="/run/user/1000/keyring-1bn6Fg/ssh"; export PATH="/home/pjm/yocto-iscan/poky/build/tmp/sysroots/x86_64-linux/usr/bin/python-native:/home/pjm/yocto-iscan/poky/scripts:/home/pjm/yocto-iscan/poky/build/tmp/sysroots/x86_64-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi:/home/pjm/yocto-iscan/poky/build/tmp/sysroots/omap3logic/usr/bin/crossscripts:/home/pjm/yocto-iscan/poky/build/tmp/sysroots/x86_64-linux/usr/sbin:/home/pjm/yocto-iscan/poky/build/tmp/sysroots/x86_64-linux/usr/bin:/home/pjm/yocto-iscan/poky/build/tmp/sysroots/x86_64-linux/sbin:/home/pjm/yocto-iscan/poky/build/tmp/sysroots/x86_64-linux//bin:/home/pjm/yocto-iscan/poky/scripts:/home/pjm/yocto-iscan/poky/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"; export HOME="/home/pjm"; /usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P /home/pjm/yocto-iscan/poky/build/downloads 'https://pypi.python.org/packages/c9/70/89b68b6600d479034276fed316e14b9107d50a62f5627da37fafe083fde3/cffi-1.11.2.tar.gz#md5=a731487324b501c8295221b629d3f5f3'
WARNING: Failed to fetch URL https://pypi.python.org/packages/c9/70/89b68b6600d479034276fed316e14b9107d50a62f5627da37fafe083fde3/cffi-1.11.2.tar.gz#md5=a731487324b501c8295221b629d3f5f3, attempting MIRRORS if available
DEBUG: Fetcher failure for URL: 'https://pypi.python.org/packages/c9/70/89b68b6600d479034276fed316e14b9107d50a62f5627da37fafe083fde3/cffi-1.11.2.tar.gz#md5=a731487324b501c8295221b629d3f5f3'. The fetch command returned success for url https://pypi.python.org/packages/c9/70/89b68b6600d479034276fed316e14b9107d50a62f5627da37fafe083fde3/cffi-1.11.2.tar.gz#md5=a731487324b501c8295221b629d3f5f3 but /home/pjm/yocto-iscan/poky/build/downloads/cffi-1.11.2.tar.gz#md5=a731487324b501c8295221b629d3f5f3 doesn't exist?!
DEBUG: Trying MIRRORS
...
What should I change in the bitbake recipe so that the do_fetch can extract the file correctly? I assume there is some post fetch step that needs to specify that the real file is called cffi-1.11.2.tar.gz and not the file with the md5 hash hanging on the end. It seems to be looking for cffi-1.11.2.tar.gz#md5=a731487324b501c8295221b629d3f5f3 instead of cffi-1.11.2.tar.gz