first commit
[scm/bb/meta-tizen.git] / recipes-tizen / python-distribute / python-distribute.inc
1 DESCRIPTION = "Easily download, build, install, upgrade, and uninstall Python packages"
2 HOMEPAGE = "http://packages.python.org/distribute"
3 SECTION = "Development/Languages/Python"
4 LICENSE = "Python-2.0 or ZPL-2.0"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by python-distribute 
13 PROVIDES += "python-distribute"
14 RPROVIDES_python-distribute += "python-distribute"
15 # the PROVIDES rules is ignore "python-setuptools = 0.6.30"
16 PROVIDES += "python-setuptools"
17 RPROVIDES_python-distribute += "python-setuptools"
18
19 RDEPENDS = ""
20
21 DEPENDS = ""
22 #DEPENDS of python-distribute 
23 inherit pythonnative
24
25 do_patch() {
26  chmod -Rf a+rX,u+w,g-w,o-w ${S}
27  #setup -q -n distribute-0.6.30
28  cp ${S}/packaging/python-distribute.manifest .
29  rm -f distribute.egg-info/*.orig
30  chmod -x {.,docs}/*.txt # Fix executable bits for documentation
31  
32  
33 }
34
35 do_configure() {
36 }
37
38 do_compile() {
39  LANG=C
40  export LANG
41  unset DISPLAY
42  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
43  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
44  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
45  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
46  
47  python setup.py build
48  
49  
50  
51 }
52
53 do_install() {
54  echo export RPM_BUILD_ROOT=${D}
55  LANG=C
56  export LANG
57  unset DISPLAY
58  rm -rf ${D} 
59  mkdir -p ${D} 
60  
61  python setup.py install --prefix=/usr --root=${D}
62  rm -rf ${D}/usr/lib/python2.7/site-packages/setuptools/tests # Don't install tests
63  rm -rf ${D}/usr/lib/python2.7/site-packages/setuptools/*.exe # Remove unneeded files
64  
65  
66 }
67
68 PACKAGES = ""
69 PACKAGES += "python-distribute"
70
71 python-distribute_files = ""
72 python-distribute_files += "python-distribute.manifest"
73 python-distribute_files += "/usr/bin/easy_install"
74 python-distribute_files += "/usr/bin/easy_install-2.7"
75 python-distribute_files += "/usr/lib/python2.7/site-packages/easy_install.py*"
76 python-distribute_files += "/usr/lib/python2.7/site-packages/pkg_resources.py*"
77 python-distribute_files += "/usr/lib/python2.7/site-packages/_markerlib/"
78 python-distribute_files += "/usr/lib/python2.7/site-packages/setuptools.pth"
79 python-distribute_files += "/usr/lib/python2.7/site-packages/setuptools/"
80 python-distribute_files += "/usr/lib/python2.7/site-packages/site.py*"
81 python-distribute_files += "/usr/lib/python2.7/site-packages/distribute-0.6.30-py2.7.egg-info/"
82 python-distribute_files += "/usr/lib/python2.7/site-packages/setuptools-*-py2.7.egg-info"
83
84 FILES_${PN} = "${python-distribute_files}"
85
86 PKG_python-distribute= "python-distribute"
87
88 require python-distribute-extraconf.inc