DESCRIPTION = "urlgrabber is a pure python package that drastically simplifies the fetching of files." HOMEPAGE = "http://urlgrabber.baseurl.org/" SECTION = "devel/python" PRIORITY = "optional" LICENSE = "LGPL2.1+" PR = "r1" LIC_FILES_CHKSUM = "file://LICENSE;md5=68ad62c64cc6c620126241fd429e68fe" SRC_URI = "http://urlgrabber.baseurl.org/download/urlgrabber-${PV}.tar.gz \ file://pycurl-curl.patch" S = "${WORKDIR}/urlgrabber-${PV}" SRC_URI[md5sum] = "1f5dc63805623cc473e06204fd240bb2" SRC_URI[sha256sum] = "06b13ff8d527dba3aee04069681b2c09c03117592d5485a80ae4b807cdf33476" RDEPENDS_${PN} = "python-pycurl" inherit distutils FILES_${PN} += "/usr/share/libexec" # setup.py will try to include the urlgrabber package, which fails since we # don't have pycurl in the native sysroot. It's included just to get the # version and description text strings for inclusion in the package. Avoid this # by dynamically creating a version of urlgrabber that does not include the # actual urlgrabber features, that setup.py can include. do_patch() { # Create a non-importing version of urlgrabber for the setup script mkdir ${S}/urlgrabber_version sed 's/^from grabber import.*//' ${S}/urlgrabber/__init__.py > ${S}/urlgrabber_version/__init__.py # Make sure the setup script uses the version-only urlgrabber sed -i 's/import urlgrabber/&_version/' ${S}/setup.py }