blob: 97dab20dfd90ed35ef9f18a61f3b89a2f1357760 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
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
}
|