Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Oct 2014 00:32:36 +0200
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        Marcus von Appen <mva@freebsd.org>
Cc:        "svn-ports-head@freebsd.org" <svn-ports-head@freebsd.org>, "svn-ports-all@freebsd.org" <svn-ports-all@freebsd.org>, "ports-committers@freebsd.org" <ports-committers@freebsd.org>
Subject:   Re: svn commit: r371447 - head/Mk/Uses
Message-ID:  <CAALwa8=hSGo_41vttRkdK5idZ7GUVQUD_85dRx_sUFty30PajQ@mail.gmail.com>
In-Reply-To: <201410241610.s9OGAf52099898@svn.freebsd.org>
References:  <201410241610.s9OGAf52099898@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 24, 2014 at 6:10 PM, Marcus von Appen <mva@freebsd.org> wrote:
> Author: mva
> Date: Fri Oct 24 16:10:40 2014
> New Revision: 371447
> URL: https://svnweb.freebsd.org/changeset/ports/371447
> QAT: https://qat.redports.org/buildarchive/r371447/
>
> Log:
>   - Use the proper python version value within a single port build
>
>     If a port requests a different python version from the one being the
>     default or provided at the command line, certain directories as well
>     as plist entries will use the wrong python version value (the one
>     being the default or provided at the command line), instead of
>     the value, the port requests
>
>   Differential Revision:        https://reviews.freebsd.org/D963
>   With hat:     python@
>
> Modified:
>   head/Mk/Uses/python.mk

Hi,

I reverted for now as it breaks some ports.

Cheers,

Antoine


>
> Modified: head/Mk/Uses/python.mk
> ==============================================================================
> --- head/Mk/Uses/python.mk      Fri Oct 24 16:02:32 2014        (r371446)
> +++ head/Mk/Uses/python.mk      Fri Oct 24 16:10:40 2014        (r371447)
> @@ -448,6 +448,16 @@ IGNORE=            needs an unsupported version of
>  PYTHON_VERSION?=       python${_PYTHON_VERSION}
>  DEPENDS_ARGS+=         PYTHON_VERSION=${PYTHON_VERSION}
>
> +# NOTE:
> +#
> +#  PYTHON_VERSION will hold whatever is passed down the dependency chain.
> +#  If a user runs `make PYTHON_VERSION=python3.3, PYTHON_VERSION will be
> +#  set to 'python3.3'. A port however may require a different version,
> +#  which is stored (above) in _PYTHON_VERSION.
> +#  Every python bit below hence should use python${_PYTHON_VERSION}, since
> +#  this is the value, the _port_ requires
> +#
> +
>  # Got the correct python version, set some publicly accessible variables
>  PYTHON_VER=            ${_PYTHON_VERSION}
>  PYTHON_SUFFIX=         ${_PYTHON_VERSION:S/.//g}
> @@ -467,8 +477,8 @@ PYTHON_ABIVER!=             ${PYTHON_CMD}-config --
>  PYTHONBASE!=   (${PYTHON_CMD} -c 'import sys; print(sys.prefix)' \
>                         2> /dev/null || ${ECHO_CMD} ${LOCALBASE}) | ${TAIL} -1
>
> -PYTHON_INCLUDEDIR=     ${PYTHONBASE}/include/${PYTHON_VERSION}${PYTHON_ABIVER}
> -PYTHON_LIBDIR=         ${PYTHONBASE}/lib/${PYTHON_VERSION}
> +PYTHON_INCLUDEDIR=     ${PYTHONBASE}/include/python${_PYTHON_VERSION}${PYTHON_ABIVER}
> +PYTHON_LIBDIR=         ${PYTHONBASE}/lib/python${_PYTHON_VERSION}
>  PYTHON_PLATFORM=       ${OPSYS:tl}${OSREL:C/\.[0-9.]*//}
>  PYTHON_SITELIBDIR=     ${PYTHON_LIBDIR}/site-packages
>  PYTHON_PKGNAMEPREFIX=  py${PYTHON_SUFFIX}-
> @@ -626,7 +636,7 @@ PLIST_SUB+= PYTHON_INCLUDEDIR=${PYTHONPR
>                 PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} \
>                 PYTHON_PLATFORM=${PYTHON_PLATFORM} \
>                 PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} \
> -               PYTHON_VERSION=${PYTHON_VERSION} \
> +               PYTHON_VERSION=${_PYTHON_VERSION} \
>                 PYTHON_VER=${PYTHON_VER}
>
>  _USES_POST+=   python
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAALwa8=hSGo_41vttRkdK5idZ7GUVQUD_85dRx_sUFty30PajQ>