first commit
[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 PROVIDES = ""
11
12 #PROVIDES by python-setuptools-devel 
13 PROVIDES += "python-setuptools-devel"
14 RPROVIDES_python-setuptools-devel += "python-setuptools-devel"
15 RPROVIDES_python-setuptools-devel += "python-setuptools-dev"
16
17 #PROVIDES by python-setuptools 
18 PROVIDES += "python-setuptools"
19 RPROVIDES_python-setuptools += "python-setuptools"
20
21 RDEPENDS = ""
22 #RDEPENDS of python-setuptools-devel (${PN}-devel)
23 RDEPENDS_${PN}-devel += "python-setuptools"
24 RDEPENDS_${PN}-devel += "python-dev"
25
26
27 DEPENDS = ""
28 #DEPENDS of python-setuptools 
29 inherit pythonnative
30
31 do_patch() {
32  chmod -Rf a+rX,u+w,g-w,o-w ${S}
33  #setup -q -n setuptools-0.6c11
34  
35  
36 }
37
38 do_configure() {
39 }
40
41 do_compile() {
42  LANG=C
43  export LANG
44  unset DISPLAY
45  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
46  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
47  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
48  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
49  
50  cp ${S}/packaging/python-setuptools.manifest .
51  find -name '*.txt' | xargs chmod -x
52  find -name '*.py' | xargs sed -i '1s|^#!python|#!/usr/bin/python|'
53  CFLAGS="$RPM_OPT_FLAGS" /usr/bin/python setup.py build
54  
55  
56  
57 }
58
59 do_install() {
60  echo export RPM_BUILD_ROOT=${D}
61  LANG=C
62  export LANG
63  unset DISPLAY
64  rm -rf ${D} 
65  mkdir -p ${D} 
66  
67  /usr/bin/python setup.py install -O1 --skip-build \
68      --root $RPM_BUILD_ROOT \
69      --prefix /usr \
70      --single-version-externally-managed
71  
72  rm -rf $RPM_BUILD_ROOT/usr/lib/python2.7/site-packages/setuptools/tests
73  
74  install -p -m 0644 ${S}/packaging/psfl.txt ${S}/packaging/zpl.txt .
75  find $RPM_BUILD_ROOT/usr/lib/python2.7/site-packages -name '*.exe' | xargs rm -f
76  chmod +x $RPM_BUILD_ROOT/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py
77  
78  
79  
80 }
81
82 PACKAGES = ""
83 PACKAGES += "python-setuptools-devel"
84 PACKAGES += "python-setuptools"
85
86 python-setuptools-devel_files = ""
87 python-setuptools-devel_files += "python-setuptools.manifest"
88 python-setuptools-devel_files += "/usr/lib/python2.7/site-packages/easy_install*"
89 python-setuptools-devel_files += "/usr/bin/*"
90
91 python-setuptools_files = ""
92 python-setuptools_files += "python-setuptools.manifest"
93 python-setuptools_files += "/usr/lib/python2.7/site-packages/*"
94
95 FILES_${PN}-devel = "${python-setuptools-devel_files}"
96 FILES_${PN} = "${python-setuptools_files}"
97
98 PKG_python-setuptools-devel= "python-setuptools-devel"
99 PKG_python-setuptools= "python-setuptools"
100
101 require python-setuptools-extraconf.inc