source: orange/install-scripts/mac/fink/orange-gui-hg-py.info @ 10441:0b6fa768f8e7

Revision 10441:0b6fa768f8e7, 5.2 KB checked in by Ales Erjavec <ales.erjavec@…>, 2 years ago (diff)

Add python version to orange-canvas script.

Line 
1Info3: <<
2Package: orange-gui-hg-py%type_pkg[python]
3Type: python (2.6 2.7)
4Version: __VERSION__
5Revision: 1
6Source: __SOURCE__
7Source-MD5: __MD5SUM__
8Source2: http://orange.biolab.si/fink/dists/10.6/main/source/orange-bundlelite-svn-0.0.12741.tgz
9Source2-MD5: b333b6b54a50685dddb75ba21df73617
10Maintainer: Mitar <mitar@tnode.com>
11HomePage: http://orange.biolab.si/
12License: GPL
13Depends: <<
14    python%type_pkg[python],
15    orange-hg-py%type_pkg[python] (>= %v),
16    pyqt4-mac-py%type_pkg[python] (>= 4.4),
17    pyqwt-qt4mac-py%type_pkg[python] (>= 5.1),
18    opengl-py%type_pkg[python],
19    sip-py%type_pkg[python],
20    graphviz,
21    setuptools-py%type_pkg[python]
22<<
23BuildDepends: <<
24    qt4-base-mac,
25    sip-py%type_pkg[python]-bin,
26    pyqt4-mac-py%type_pkg[python],
27    cmake
28<<
29# Conflicts other versions because of app bundle
30Conflicts: orange-gui-svn-py%type_pkg[python], orange-hg
31Replaces: orange-gui-svn-py%type_pkg[python], orange-hg-py%type_pkg[python]
32Description: Data mining framework (GUI)
33DescDetail: <<
34    Orange is a component-based data mining software. It includes a range
35    of data visualization, exploration, preprocessing and modeling
36    techniques. It can be used through a nice and intuitive user interface
37    or, for more advanced users, as a module for Python programming language.
38   
39    This package provides a graphical user interface.
40<<
41AppBundles: ../orange-bundlelite-svn-0.0.12741/Orange-%type_pkg[python].app
42Shlibs: <<
43    %p/lib/python%type_raw[python]/site-packages/orangeqt.so 0.0.0 %n (>= 0.0.0-1)
44<<
45SplitOff: <<
46    Package: orange-hg-py%type_pkg[python]
47    Depends: <<
48        python%type_pkg[python],
49        numpy-py%type_pkg[python],
50        pil-py%type_pkg[python],
51        networkx-py%type_pkg[python]
52    <<
53    Suggests: orange-gui-hg-py%type_pkg[python]
54    Conflicts: orange-svn-py%type_pkg[python]
55    Replaces: orange-svn-py%type_pkg[python]
56    Description: Data mining framework (Python module)
57    DescDetail: <<
58        Orange is a component-based data mining software. It includes a range
59        of data visualization, exploration, preprocessing and modeling
60        techniques. It can be used through a nice and intuitive user interface
61        or, for more advanced users, as a module for Python programming language.
62       
63        This package provides a Python module.
64    <<
65    Files: <<
66        lib/python%type_raw[python]/site-packages/Orange/*
67        lib/python%type_raw[python]/site-packages/Orange-orng-modules.pth
68        share/doc/orange-hg-py%type_pkg[python]
69        bin/orange-canvas%type_pkg[python]
70    <<
71<<
72CompileScript: <<
73    #!/bin/bash -ev
74   
75    export CPPFLAGS="-O0 -g0"
76    export LDFLAGS="-O0 -g0"
77
78    # Build orange
79    %p/bin/python%type_raw[python] setup.py build
80   
81    # Compile scripts later on assume Python executable is named "python" - so we give them that
82    #export PATH=%b:$PATH
83    #ln -s %p/bin/python%type_raw[python] python
84   
85    # To build orangeqt module we need to force cmake to look in
86    # the proper places.
87   
88    # For cmake to find qmake
89    export PATH=%p/lib/qt4-mac/bin:$PATH
90    # And cmake to find PyQt4
91    export PYTHONPATH=%p/lib/qt4-mac/lib/python%type_raw[python]/site-packages/
92
93    # Finally compile orangeqt
94    cd source/orangeqt
95    mkdir build
96    cd build
97    cmake -DCMAKE_BUILD_TYPE=Release -DPython_ADDITIONAL_VERSIONS=%type_raw[python] -DCMAKE_LIBRARY_PATH=%p/lib -DCMAKE_SYSTEM_IGNORE_PATH=/usr/lib ../
98    make VERBOSE=1
99    cd ../../../
100   
101    # Prepares bundle
102    cat <<-'EOF' > ../orange-bundlelite-svn-0.0.12741/Orange.app/Contents/MacOS/Orange
103        #!/bin/bash
104        . %p/bin/init.sh
105        CANVAS_FILE="%p/lib/python%type_raw[python]/site-packages/Orange/OrangeCanvas/orngCanvas.pyw"
106        export PYTHONPATH="%p/lib/qt4-mac/lib/python%type_raw[python]/site-packages${PYTHONPATH:+:$PYTHONPATH}"
107        # LaunchServices passes the Carbon process identifier to the application with -psn parameter - we do not want it
108        if [[ "\$1" == -psn* ]] ; then
109            shift
110        fi
111        exec -a "$0" %p/bin/python%type_raw[python] "$CANVAS_FILE" "$@"
112    EOF
113    chmod +x ../orange-bundlelite-svn-0.0.12741/Orange.app/Contents/MacOS/Orange
114    mv ../orange-bundlelite-svn-0.0.12741/Orange.app ../orange-bundlelite-svn-0.0.12741/Orange-%type_pkg[python].app
115<<
116InstallScript: <<
117    #!/bin/bash -ev
118   
119    %p/bin/python%type_raw[python] setup.py install --root=%d --single-version-externally-managed
120   
121    # Also install orangeqt module
122    mv source/orangeqt/build/orangeqt.so  %i/lib/python%type_raw[python]/site-packages/
123   
124    # Fix install name id
125    install_name_tool -id %p/lib/python%type_raw[python]/site-packages/orangeqt.so %i/lib/python%type_raw[python]/site-packages/orangeqt.so
126   
127    # Register dataset path
128    # TODO: this should be done by setup.py install and using global orangerc.cfg file
129    echo "datasetsPath=\"%p/share/doc/orange-svn-py%type_pkg[python]/datasets/\"" > %i/lib/python%type_raw[python]/site-packages/Orange/orng/orngConfiguration.py   
130
131    # Documentation for orange-gui-hg-py
132    mkdir -p %i/share/doc/orange-gui-hg-py%type_pkg[python]/
133    cp COPYING LICENSES %i/share/doc/orange-gui-hg-py%type_pkg[python]/
134    cp Orange/doc/style.css %i/share/doc/orange-gui-hg-py%type_pkg[python]/
135    mv Orange/doc/widgets/ %i/share/doc/orange-gui-hg-py%type_pkg[python]/
136   
137    # Documentation for orange-hg-py
138    mkdir -p %i/share/doc/orange-hg-py%type_pkg[python]/
139    cp COPYING LICENSES %i/share/doc/orange-hg-py%type_pkg[python]/
140    mv Orange/doc/* %i/share/doc/orange-hg-py%type_pkg[python]/
141
142    # Add python version to bin/orange-canvas script
143    mv %i/bin/orange-canvas %i/bin/orange-canvas%type_pkg[python]
144<<
145<<
Note: See TracBrowser for help on using the repository browser.