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-base / recipes-devtools / python-setuptools / python-setuptools.inc
1 DESCRIPTION = "Easily build and distribute Python packages"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Applications/System"
4 LICENSE = "Python or ZPLv2.0"
5 PV = "0.6c11"
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-setuptools-dev
17 PROVIDES += "python-setuptools-dev"
18
19
20 #PROVIDES by python-setuptools
21
22
23 RDEPENDS = ""
24 #RDEPENDS of python-setuptools-dev (${PN}-dev)
25 RDEPENDS_${PN}-dev += "python"
26 RDEPENDS_${PN}-dev += "python-setuptools"
27
28
29 DEPENDS = ""
30 #DEPENDS of python-setuptools
31 inherit pythonnative
32
33 do_prep() {
34  cd ${S}
35  chmod -Rf a+rX,u+w,g-w,o-w ${S}
36  #setup -q -n setuptools-0.6c11
37  
38  
39 }
40 do_patch_append() {
41     bb.build.exec_func('do_prep', d)
42 }
43
44 do_configure() {
45 }
46
47 do_compile() {
48  cd ${S}
49  LANG=C
50  export LANG
51  unset DISPLAY
52  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
53  
54  cp ${S}/packaging/python-setuptools.manifest .
55  find -name '*.txt' | xargs chmod -x
56  find -name '*.py' | xargs sed -i '1s|^#!python|#!python|'
57  CFLAGS="$RPM_OPT_FLAGS" python setup.py build
58  
59  
60  
61 }
62
63 do_install() {
64  export RPM_BUILD_ROOT=${D}
65  cd ${S}
66  LANG=C
67  export LANG
68  unset DISPLAY
69  rm -rf ${D}
70  mkdir -p ${D}
71  
72  python setup.py install -O1 --skip-build \
73      --root $RPM_BUILD_ROOT \
74      --prefix ${prefix} \
75      --single-version-externally-managed
76  
77  rm -rf $RPM_BUILD_ROOT${prefix}/lib/python2.7/site-packages/setuptools/tests
78  
79  install -p -m 0644 ${S}/packaging/psfl.txt ${S}/packaging/zpl.txt .
80  find $RPM_BUILD_ROOT${prefix}/lib/python2.7/site-packages -name '*.exe' | xargs rm -f
81  chmod +x $RPM_BUILD_ROOT${prefix}/lib/python2.7/site-packages/setuptools/command/easy_install.py
82  
83  
84  
85 }
86
87 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
88 PACKAGES += " python-setuptools-dev "
89 PACKAGES += " python-setuptools "
90
91 python-setuptools-dev_files = ""
92 python-setuptools-dev_files += "${prefix}/lib/python2.7/site-packages/easy_install*"
93 python-setuptools-dev_files += "${prefix}/bin/*"
94 MANIFESTFILES_${PN}-dev = "python-setuptools.manifest"
95
96 python-setuptools_files = ""
97 python-setuptools_files += "${prefix}/lib/python2.7/site-packages/*"
98 MANIFESTFILES_${PN} = "python-setuptools.manifest"
99
100 FILES_${PN}-dev = "${python-setuptools-dev_files}"
101 FILES_${PN} = "${python-setuptools_files}"
102
103 PKG_python-setuptools-dev= "python-setuptools-dev"
104 PKG_python-setuptools= "python-setuptools"
105
106 require python-setuptools-extraconf.inc
107