[Bug 668309] New: as-python.m4 should be updated or removed in favor of standard automake AM_PATH_PYTHON
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Thu Jan 19 15:55:15 PST 2012
https://bugzilla.gnome.org/show_bug.cgi?id=668309
GStreamer | gst-plugins-base | 0.10.22
Summary: as-python.m4 should be updated or removed in favor of
standard automake AM_PATH_PYTHON
Classification: Platform
Product: GStreamer
Version: 0.10.22
OS/Version: Solaris
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins-base
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: mooney at dogbert.cc.ndsu.nodak.edu
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Building gst-plugins-base-0.10.35 on x86_64-sun-solaris2.10.
There are several minor issues with the common/m4/as-python.m4 macro.
- its version checks are out of date. It checks for a python binary named
"python2.2", but not python2.7, python2.6, etc.
- much of the code in the checks that actually uses python to determine things
(like PYTHON_VERSION & PYTHON_PLATFORM) is not compatible with python3. A
few of the Linux distributions are planning to convert to python3, so the
version check should really be modified so that it prefers a binary named
"python2" over one just named "python", as the day is coming when "python"
is a 3.x binary.
- it just assumes that whatever python binary it finds, the prefix it's
installed under is going to be the same as ${prefix}. That's a bad
assumption, and it's not needed; you can just ask python what its prefix
is, similar to how a test is already asking python what its platform
and version are. The test is just
PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"`
- same is true for PYTHON_EXEC_PREFIX:
PYTHON_EXEC_PREFIX=`$PYTHON -c "import sys; print sys.exec_prefix"`
- same is true for pythondir and pkgpyexecdir; just ask python:
# note distutils requires python > 1.5
pythondir=`$PYTHON -c "from distutils import sysconfig; print
sysconfig.get_python_lib()"`
pyexecdir=`$PYTHON -c "from distutils import sysconfig; print
sysconfig.get_python_lib(plat_specific=1)"`
I have a patch that addresses all of these things, but I'm also kind of
wondering if the common/as/as-python.m4 could just be removed, in favor of the
standard AM_PATH_PYTHON macro that comes with automake. That macro even
appears to work with python3.x, though that isn't much help with the python
code in gst-plugins-base doesn't work with 3.x.
Let me know if you want the patch, or if you would like me to instead provide a
patch that just converts to using AM_PATH_PYTHON.
--
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