source: orange/install-scripts/mac/fink/orange-gui-hg-py.info @ 10452:106391fd039e

Revision 10452:106391fd039e, 5.3 KB checked in by Ales Erjavec <ales.erjavec@…>, 2 years ago (diff)

More hacks for cmake to find the correct python.

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    # To build orangeqt module we need to force cmake to look in
82    # the proper places.
83   
84    # For cmake to find qmake
85    export PATH=%p/lib/qt4-mac/bin:$PATH
86    # And cmake to find PyQt4
87    export PYTHONPATH=%p/lib/qt4-mac/lib/python%type_raw[python]/site-packages/
88   
89    # Try every thing possible to convince cmake to use our python
90    export PATH=%b:$PATH
91    ln -s %p/bin/python%type_raw[python] python
92    ln -s %p/bin/python%type_raw[python] python%type_raw[python]
93
94    # Finally compile orangeqt
95    cd source/orangeqt
96    mkdir build
97    cd build
98    cmake -DCMAKE_BUILD_TYPE=Release -DPython_ADDITIONAL_VERSIONS=%type_raw[python] -DCMAKE_LIBRARY_PATH=%p/lib -DCMAKE_SYSTEM_IGNORE_PATH=/usr/lib ../
99    make VERBOSE=1
100    cd ../../../
101   
102    # Clean up the python sym links
103    rm python
104    rm python%type_raw[python]
105   
106    # Prepares bundle
107    cat <<-'EOF' > ../orange-bundlelite-svn-0.0.12741/Orange.app/Contents/MacOS/Orange
108        #!/bin/bash
109        . %p/bin/init.sh
110        CANVAS_FILE="%p/lib/python%type_raw[python]/site-packages/Orange/OrangeCanvas/orngCanvas.pyw"
111        export PYTHONPATH="%p/lib/qt4-mac/lib/python%type_raw[python]/site-packages${PYTHONPATH:+:$PYTHONPATH}"
112        # LaunchServices passes the Carbon process identifier to the application with -psn parameter - we do not want it
113        if [[ "\$1" == -psn* ]] ; then
114            shift
115        fi
116        exec -a "$0" %p/bin/python%type_raw[python] "$CANVAS_FILE" "$@"
117    EOF
118    chmod +x ../orange-bundlelite-svn-0.0.12741/Orange.app/Contents/MacOS/Orange
119    mv ../orange-bundlelite-svn-0.0.12741/Orange.app ../orange-bundlelite-svn-0.0.12741/Orange-%type_pkg[python].app
120<<
121InstallScript: <<
122    #!/bin/bash -ev
123   
124    %p/bin/python%type_raw[python] setup.py install --root=%d --single-version-externally-managed
125   
126    # Also install orangeqt module
127    mv source/orangeqt/build/orangeqt.so  %i/lib/python%type_raw[python]/site-packages/
128   
129    # Fix install name id
130    install_name_tool -id %p/lib/python%type_raw[python]/site-packages/orangeqt.so %i/lib/python%type_raw[python]/site-packages/orangeqt.so
131   
132    # Register dataset path
133    # TODO: this should be done by setup.py install and using global orangerc.cfg file
134    echo "datasetsPath=\"%p/share/doc/orange-svn-py%type_pkg[python]/datasets/\"" > %i/lib/python%type_raw[python]/site-packages/Orange/orng/orngConfiguration.py   
135
136    # Documentation for orange-gui-hg-py
137    mkdir -p %i/share/doc/orange-gui-hg-py%type_pkg[python]/
138    cp COPYING LICENSES %i/share/doc/orange-gui-hg-py%type_pkg[python]/
139    cp Orange/doc/style.css %i/share/doc/orange-gui-hg-py%type_pkg[python]/
140    mv Orange/doc/widgets/ %i/share/doc/orange-gui-hg-py%type_pkg[python]/
141   
142    # Documentation for orange-hg-py
143    mkdir -p %i/share/doc/orange-hg-py%type_pkg[python]/
144    cp COPYING LICENSES %i/share/doc/orange-hg-py%type_pkg[python]/
145    mv Orange/doc/* %i/share/doc/orange-hg-py%type_pkg[python]/
146
147    # Add python version to bin/orange-canvas script
148    mv %i/bin/orange-canvas %i/bin/orange-canvas%type_pkg[python]
149<<
150<<
Note: See TracBrowser for help on using the repository browser.