Ticket #8027: python_configure.patch

File python_configure.patch, 3.0 KB (added by Raymond Wagner, 10 years ago)
  • configure

     
    301301  echo "  --with-bindings=LIST     install the bindings specified in the"
    302302  echo "                           comma-separated list"
    303303  echo "                           Supported bindings: perl, python"
     304  echo "  --python-exec=PATH       Force a specific executable to use"
    304305<<BLOCK_QUOTE
    305306  echo
    306307  echo "Developer options (useful when working on FFmpeg itself):"
     
    12631264    runprefix
    12641265    shlibdir
    12651266    x11_path
     1267    python_exec
    12661268'
    12671269
    12681270CMDLINE_SET="
     
    15221524libdir_default='${prefix}/lib'
    15231525mandir_default='${prefix}/share/man'
    15241526shlibdir_default="$libdir_default"
     1527python_exec_default="python"
    15251528
    15261529libdir_name='lib'
    15271530
     
    18221825            fi
    18231826        done
    18241827    ;;
     1828    --python-exec=*) python_exec=$optval
     1829    ;;
    18251830    --without-bindings=*)
    18261831        tmp_bindings=`echo ${optval} | sed -e 's/,/ /g'`
    18271832        for binding in ${tmp_bindings} ; do
     
    38783883echo "# Bindings"
    38793884echo "bindings_perl             ${bindings_perl-no}"
    38803885echo "bindings_python           ${bindings_python-no}"
     3886echo "python_exec               ${python_exec-python}"
    38813887echo ""
    38823888
    38833889MYTH_CONFIG_H=libs/libmythdb/mythconfig.h
     
    38983904echo "SYSROOT=$sysroot" >> $MYTH_CONFIG_MAK
    38993905echo "LIBDIRNAME=$libdir_name" >> $MYTH_CONFIG_MAK
    39003906echo "LIBDIR=$libdir" >> $MYTH_CONFIG_MAK
     3907echo "PYTHON_EXEC=$python_exec" >> $MYTH_CONFIG_MAK
    39013908<<BLOCK_QUOTE
    39023909echo "SHLIBDIR=\$(DESTDIR)$shlibdir" >> config.mak
    39033910echo "INCDIR=\$(DESTDIR)$incdir" >> config.mak
     
    39073914echo "SRC_PATH=\"$source_path\"" >> config.mak
    39083915echo "SRC_PATH_BARE=$source_path" >> config.mak
    39093916echo "BUILD_ROOT=\"$PWD\"" >> config.mak
     3917echo "PYTHON_EXEC=\"$python_exec\"" >> config.mak
    39103918echo "CC=$cc" >> config.mak
    39113919echo "AS=$as" >> config.mak
    39123920echo "YASM=$yasmexe" >> config.mak
  • bindings/python/python.pro

     
    22
    33python_build.target = python_build
    44python_build.depends = setup.py FORCE
    5 python_build.commands = python setup.py build
     5python_build.commands = $$PYTHON_EXEC setup.py build
    66
    77python_install.target = python_install
    88python_install.CONFIG = no_path
    9 python_install.commands = python setup.py install --skip-build --root=\"$(if $(INSTALL_ROOT),$(INSTALL_ROOT),/)\"
     9python_install.commands = $$PYTHON_EXEC setup.py install --skip-build
    1010
    11 # This is done so the default /usr/local prefix installs to the "normal"
    12 # /usr/lib/python{VER}/site-packages directory.
    13 !contains(PREFIX, ^/usr(/local)?/?$) {
    14         python_install.commands += --prefix=\"$${PREFIX}\"
    15 }
     11QMAKE_CLEAN += dummy_file; $$PYTHON_EXEC setup.py clean --all
    1612
    17 QMAKE_CLEAN += dummy_file; python setup.py clean --all
    18 
    1913PRE_TARGETDEPS += python_build
    2014QMAKE_LINK=@-echo
    2115QMAKE_EXTRA_UNIX_TARGETS += python_build