[Bug 675604] gst-python: fix compilation on windows

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed May 9 02:00:17 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=675604
  GStreamer | gst-python | 0.10.x

--- Comment #6 from Andoni Morales <ylatuya at gmail.com> 2012-05-09 09:00:11 UTC ---
This macro has several issues that makes it impossible to use for windows.

The first problem comes when this macro is being used in a cross-compilation
environment. This macro calls the native python to guess -I -L and -l which is
wrong as you will get the details for the system's python and not the target
one. Also this macro don't check whether PYTHON_INCLUDES or PYTHON_LIBS is set
to skip the check.
On a native environment, this macro makes use of python-config, which is not
available on Windows

if $PYTHON-config --help 2>/dev/null; then
   PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
else
   PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"

The fallback path is wrong as the windows installer installs the python headers
in ${py_prefix}/Include


For PYTHON_LIBS -L is also wrong because libpython27.dll, which is the dll used
for linking, is not in ${py_prefix}/lib but in c:/Windows/System32

if $PYTHON-config --help 2>/dev/null; then
 PYTHON_LIBS=`$PYTHON-config --ldflags 2>/dev/null`
 PYTHON_LIB=`$PYTHON -c "import distutils.sysconfig as s; print
s.get_python_lib(standard_lib=1)"`
[...]
else
 PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}"
 PYTHON_LIB_LOC="${py_prefix}/lib"
fi


Also py_prefix must be overridden with the am_cv_python_pyexecdir and
am_cv_python_pythondir because paths from the python command are windows paths
with backslashes which are escaped.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list