Egginfo plist handling and PREFIX
William Grzybowski
william88 at gmail.com
Wed Jan 8 14:23:52 UTC 2014
Hi,
Well thats strange, was your python compiled for different LOCALBASE
as well? This var is extracted from python binary..
On Wed, Jan 8, 2014 at 1:04 PM, Ganael LAPLANCHE <martymac at freebsd.org> wrote:
> Hi,
>
> We may have a bug in r336553
> (http://svnweb.freebsd.org/ports?view=revision&revision=336553) within
> the add-plist-egginfo target regarding PREFIX handling.
>
> It is no more possible to install e.g. sysutils/dvdvideo or
> sysutils/brebis with a custom PREFIX :
>
> # cd /usr/ports/sysutils/brebis
> # make PREFIX=/files/Down/brebis-test install
> [...]
> ===> Registering installation for brebis-0.8
> pkg-static:
> lstat(/tmp/wrkdirs/files/Ports/ports/sysutils/brebis/work/stage/tmp/wrkdirs/files/Ports/ports/sysutils/brebis/work/stage/files/Down/brebis-test/lib/python3.3/site-packages/brebis-0.8-py3.3.egg-info/PKG-INFO):
> No such file or directory
> pkg-static:
> lstat(/tmp/wrkdirs/files/Ports/ports/sysutils/brebis/work/stage/tmp/wrkdirs/files/Ports/ports/sysutils/brebis/work/stage/files/Down/brebis-test/lib/python3.3/site-packages/brebis-0.8-py3.3.egg-info/SOURCES.txt):
> No such file or directory
> pkg-static:
> lstat(/tmp/wrkdirs/files/Ports/ports/sysutils/brebis/work/stage/tmp/wrkdirs/files/Ports/ports/sysutils/brebis/work/stage/files/Down/brebis-test/lib/python3.3/site-packages/brebis-0.8-py3.3.egg-info/dependency_links.txt):
> No such file or directory
> pkg-static:
> lstat(/tmp/wrkdirs/files/Ports/ports/sysutils/brebis/work/stage/tmp/wrkdirs/files/Ports/ports/sysutils/brebis/work/stage/files/Down/brebis-test/lib/python3.3/site-packages/brebis-0.8-py3.3.egg-info/top_level.txt):
> No such file or directory
> pkg-static:
> lstat(/tmp/wrkdirs/files/Ports/ports/sysutils/brebis/work/stage/files/Down/brebis-test//tmp/wrkdirs/files/Ports/ports/sysutils/brebis/work/stage/files/Down/brebis-test/lib/python3.3/site-packages/brebis-0.8-py3.3.egg-info/):
> No such file or directory
> *** Error code 74
>
> Before installation, egginfo files are staged here :
>
> /tmp/wrkdirs/files/Ports/ports/sysutils/brebis/work/stage/files/Down/brebis-test/lib/python3.3/site-packages/brebis-0.8-py3.3.egg-info
>
> wich corresponds to ${STAGEDIR}${PREFIX}[...], not
> ${STAGEDIR}${PYTHONBASE}[...].
>
> Replacing ${PYTHONBASE} by ${PREFIX} within Mk/bsd.python.mk with this
> patch :
>
> 8<------------------
> --- Mk/bsd.python.mk.orig 2014-01-08 11:39:35.869744772 +0100
> +++ Mk/bsd.python.mk 2014-01-08 11:42:47.999731061 +0100
> @@ -515,23 +515,23 @@
> add-plist-egginfo:
> .if !defined(PYDISTUTILS_NOEGGINFO) && \
> !defined(PYDISTUTILS_AUTOPLIST) && \
> (defined(INSTALLS_EGGINFO) || \
> (defined(USE_PYDISTUTILS) && \
> ${USE_PYDISTUTILS} != "easy_install")) && \
> defined(PYTHON_REL)
> . for egginfo in ${PYDISTUTILS_EGGINFO}
> if [ -d "${PYDISTUTILS_EGGINFODIR}/${egginfo}" ]; then \
> ${LS} ${PYDISTUTILS_EGGINFODIR}/${egginfo} | while read
> f; do \
> - ${ECHO_CMD}
> ${PYDISTUTILS_EGGINFODIR:S;^${STAGEDIR}${PYTHONBASE}/;;}/${egginfo}/$${f} >>
> ${TMPPLIST}; \
> + ${ECHO_CMD}
> ${PYDISTUTILS_EGGINFODIR:S;^${STAGEDIR}${PREFIX}/;;}/${egginfo}/$${f} >>
> ${TMPPLIST}; \
> done; \
> - ${ECHO_CMD} "@unexec rmdir
> \"%D/${PYDISTUTILS_EGGINFODIR:S;${STAGEDIR}${PYTHONBASE}/;;}/${egginfo}\" 2>/dev/null
> || true" >> ${TMPPLIST}; \
> + ${ECHO_CMD} "@unexec rmdir
> \"%D/${PYDISTUTILS_EGGINFODIR:S;${STAGEDIR}${PREFIX}/;;}/${egginfo}\"
> 2>/dev/null || true" >> ${TMPPLIST}; \
> fi;
> . endfor
> .else
> @${DO_NADA}
> .endif
>
> .if defined(PYDISTUTILS_AUTOPLIST) && defined(USE_PYDISTUTILS)
> _RELSITELIBDIR= ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;}
> _RELLIBDIR= ${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;}
>
> 8<------------------
>
> fixes the problem, but I am not sure it is the way to go. I may be
> missing something here.
>
> Any help would be greatly appreciated. Can you tell me what you think
> about that ?
>
> Thanks in advance,
> Best regards,
>
> --
> Ganael LAPLANCHE <ganael.laplanche at martymac.org>
> http://www.martymac.org | http://contribs.martymac.org
> FreeBSD: martymac <martymac at FreeBSD.org>, http://www.FreeBSD.org
--
William Grzybowski
------------------------------------------
Curitiba/PR - Brasil
More information about the freebsd-python
mailing list