Tizen recipes : Fix tizen common build and get little more closer to current Tizen...
[scm/bb/meta-tizen.git] / meta-tizen-ivi / meta-tizen-common-devtools / recipes-devtools / python-requests / python-requests.inc
1 DESCRIPTION = "Awesome Python HTTP Library That's Actually Usable"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "System/Base"
4 LICENSE = "Apache-2.0"
5 PV = "2.2.1"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by python-requests
17
18
19 RDEPENDS = ""
20 #RDEPENDS of python-requests (${PN})
21 RDEPENDS_${PN} += "python"
22
23
24 DEPENDS = ""
25 #DEPENDS of python-requests
26 inherit pythonnative
27 DEPENDS += "python-setuptools"
28 DEPENDS_append_class-native = " fdupes-native"
29 DEPENDS_append_class-target = " fdupes-native"
30
31 do_prep() {
32  cd ${S}
33  chmod -Rf a+rX,u+w,g-w,o-w ${S}
34  #setup -q -n requests-2.2.1
35  cp  ${S}/packaging/python-requests.manifest .
36  # for rpmlint warning: remove shebang from python library
37  sed -i '/^#!/d' ./requests/certs.py
38  sed -i '/^#!/d' ./requests/packages/chardet/chardetect.py
39  
40  
41 }
42 do_patch_append() {
43     bb.build.exec_func('do_prep', d)
44 }
45
46 do_configure() {
47 }
48
49 do_compile() {
50  cd ${S}
51  LANG=C
52  export LANG
53  unset DISPLAY
54  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
55  
56  python setup.py build
57  
58  exit 0
59  python setup.py test
60  
61  
62  
63 }
64
65 do_install() {
66  export RPM_BUILD_ROOT=${D}
67  cd ${S}
68  LANG=C
69  export LANG
70  unset DISPLAY
71  rm -rf ${D}
72  mkdir -p ${D}
73  
74  python setup.py install --skip-build --prefix=${prefix} --root=${D}
75  #fdupes $RPM_BUILD_ROOT
76  
77  
78 }
79
80 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
81 PACKAGES += " python-requests "
82
83 python-requests_files = ""
84 python-requests_files += "${prefix}/lib/python2.7/site-packages/*"
85 MANIFESTFILES_${PN} = "python-requests.manifest"
86
87 FILES_${PN} = "${python-requests_files}"
88
89 PKG_python-requests= "python-requests"
90
91 require python-requests-extraconf.inc
92