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