Changeset 8929:22e2d257cf30 in orange


Ignore:
Timestamp:
09/09/11 09:10:07 (3 years ago)
Author:
mitar
Branch:
default
Convert:
c542731d22ae38f2e28c00dc63bad74412a52f21
Message:

Made Python executable configurable when compiling.

Location:
source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • source/Makefile

    r8916 r8929  
    1010# This is nedded for orangeqt on Mac 
    1111ifndef DESTDIR 
    12 DESTDIR = $(shell python -s -c "import sys; print sys.prefix+'/lib/python'+sys.version[:3]")/site-packages/orange 
     12DESTDIR = $(shell $(PYTHON) -s -c "import sys; print sys.prefix+'/lib/python'+sys.version[:3]")/site-packages/orange 
    1313endif # DESTDIR 
    1414 
  • source/makefile.defs

    r8735 r8929  
    22# If this does not work, find Python.h yourself and enter 
    33# the directory below. 
    4 PYTHONINCLUDE = $(shell python -c "import sys; print sys.prefix+'/include/python'+sys.version[:3]") 
    5 PYTHONLIB = $(shell python -c "import sys; print sys.prefix+'/lib/python'+sys.version[:3]") 
     4PYTHON ?= python 
     5PYTHONINCLUDE = $(shell $(PYTHON) -c "import sys; print sys.prefix+'/include/python'+sys.version[:3]") 
     6PYTHONLIB = $(shell $(PYTHON) -c "import sys; print sys.prefix+'/lib/python'+sys.version[:3]") 
    67PYTHONSITEPKGS = $(PYTHONLIB)/site-packages 
    7 PYTHONVER = $(shell python -c "import sys; print sys.version[:3]") 
     8PYTHONVER = $(shell $(PYTHON) -c "import sys; print sys.version[:3]") 
    89 
    910 
     
    2728LIBRARY_FILE = liborange.so 
    2829 
    29 NUMPY_INCLUDE = $(shell python -c "import numpy; print numpy.get_include();") 
     30NUMPY_INCLUDE = $(shell $(PYTHON) -c "import numpy; print numpy.get_include();") 
    3031 
    3132ifeq ($(OS), Darwin) 
    3233  ifeq ($(PYTHONVER), 2.7) 
    33     export MACOSX_DEPLOYMENT_TARGET = $(shell python -c "import sysconfig; print sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')") 
     34    export MACOSX_DEPLOYMENT_TARGET = $(shell $(PYTHON) -c "import sysconfig; print sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')") 
    3435  else 
    3536    export MACOSX_DEPLOYMENT_TARGET = 10.4 
     
    6869 
    6970makefile.deps: 
    70     python ../pyxtract/makedep.py -n $(MODULENAME) 
     71    $(PYTHON) ../pyxtract/makedep.py -n $(MODULENAME) 
    7172    rm -f ppp/stamp 
    7273    rm -f px/stamp 
  • source/orange/Makefile

    r8735 r8929  
    77 
    88r_imports.jpp: r_imports.hpp 
    9     python ../pyxtract/jitlink_build.py R.so r_imports.hpp 
     9    $(PYTHON) ../pyxtract/jitlink_build.py R.so r_imports.hpp 
    1010r_imports.ipp: r_imports.hpp 
    11     python ../pyxtract/jitlink_build.py R.so r_imports.hpp 
     11    $(PYTHON) ../pyxtract/jitlink_build.py R.so r_imports.hpp 
    1212 
    1313 
  • source/pyxtract/makedep.py

    r8735 r8929  
    140140if ppp_timestamp_dep: 
    141141  makedepsfile.write("../orange/ppp/lists: ../pyxtract/defvectors.py\n") 
    142   makedepsfile.write("\tpython ../pyxtract/defvectors.py\n") 
     142  makedepsfile.write("\t%s ../pyxtract/defvectors.py\n" % (sys.executable,)) 
    143143  if modulename != "ORANGE": 
    144144    ppp_timestamp_dep.extend(["../orange/ppp/lists", "../orange/ppp/stamp"]) 
    145145  makedepsfile.write("ppp/stamp: ../pyxtract/pyprops.py %s\n" % " ".join(ppp_timestamp_dep)) 
    146   makedepsfile.write("\tpython ../pyxtract/pyprops.py -q -n %s" % modulename) 
     146  makedepsfile.write("\t%s ../pyxtract/pyprops.py -q -n %s" % (sys.executable, modulename)) 
    147147  if modulename != "ORANGE": 
    148148    makedepsfile.write(" -l ../orange/ppp/stamp -l ../orange/ppp/lists") 
     
    152152  makedepsfile.write("px/stamp: ../pyxtract/pyxtract.py %s | ppp/stamp\n" % " ".join(px_timestamp_dep)) 
    153153  short = {"ORANGEOM": "-w OM", "ORANGENE": "-w OG"}.get(modulename, "") 
    154   makedepsfile.write("\tpython ../pyxtract/pyxtract.py -m -q -n %s %s %s" % (modulename, short, " ".join(px_timestamp_dep))) 
     154  makedepsfile.write("\t%s ../pyxtract/pyxtract.py -m -q -n %s %s %s" % (sys.executable, modulename, short, " ".join(px_timestamp_dep))) 
    155155  if modulename != "ORANGE": 
    156156    makedepsfile.write(" -l ../orange/px/stamp") 
Note: See TracChangeset for help on using the changeset viewer.