pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: py-Scientific fix



On 3/27/19 7:29 PM, Jonathan Perkin wrote:
* On 2019-03-28 at 00:17 GMT, Jason Bacon wrote:

On 3/27/19 5:33 PM, Jonathan Perkin wrote:
* On 2019-03-27 at 22:15 GMT, Jason Bacon wrote:

+PLATFORM!=    ${PYTHONBIN} -c "import sys; print sys.platform"
This should be wrapped in an ".if exists(${PYTHONBIN}", otherwise
users and bulk builds will get strange errors when running non-build
targets in that directory.
I'm not seeing that - all targets I've tried work fine for me (fetch, clean,
patch, etc.).  I think including pyversion.mk defines it regardless of
target.
Try uninstalling python.  This will be the case e.g. during pbulk's
scanning phase where no dependencies are installed but it calls the
pbulk-index target in each package directory.

Also might be worth changing the variable to PYTHON_PLATFORM or
something, PLATFORM seems generic enough that it might be used at some
point in the infrastructure.
Have you been talking to the voice in my head?  It said the same thing as I
was coding this...

Better?
Yes, joerg's right, :sh is preferable.

OK, I see it now.  After removing python27 and inserting:

TEST!=          ${PYTHONBIN} -c "import sys; print sys.platform"

Linux pbulkc7.ceas  bacon ~/Pkgsrc/pkgsrc-2019-03-25/math/py-Scientific 1026: bmake clean sh: /home/bacon/Pkgsrc/pkg-2019-03-25/bin/python2.7: No such file or directory bmake.bin: "/home/bacon/Pkgsrc/pkgsrc-2019-03-25/math/py-Scientific/Makefile" line 19: warning: "/home/bacon/Pkgsrc/pkg-2019-03-25/bin/python2.7 -c "import sys; print sys.platform"" returned non-zero status
sh: /lib64/libiconv.*: No such file or directory
sh: /usr/lib64/libiconv.*: No such file or directory
sh: /lib64/libcrypto.so.10 /lib64/libcrypto.so.1.0.2k: No such file or directory sh: /usr/lib64/libcrypto.so.10 /usr/lib64/libcrypto.so.1.0.2k: No such file or directory
sh: /lib64/libdes.*: No such file or directory
sh: /usr/lib64/libdes.*: No such file or directory
sh: /lib64/libssl.so.10 /lib64/libssl.so.1.0.2k: No such file or directory
sh: /usr/lib64/libssl.so.10 /usr/lib64/libssl.so.1.0.2k: No such file or directory
===> Cleaning for py27-Scientific-2.8.1nb9
/bin/sh: -d: command not found

With only the following:

PYPLAT_CMD=     ${PYTHONBIN} -c "import sys; print sys.platform"
PLIST_SUBST+=   PYPLAT=${PYPLAT_CMD:sh}

Linux pbulkc7.ceas  bacon ~/Pkgsrc/pkgsrc-2019-03-25/math/py-Scientific 1028: bmake clean
===> Cleaning for py27-Scientific-2.8.1nb9
Linux pbulkc7.ceas  bacon ~/Pkgsrc/pkgsrc-2019-03-25/math/py-Scientific 1029: bmake fetch
=> Bootstrap dependency digest>=20010302: found digest-20190127
WARNING: [license.mk] Every package should define a LICENSE.
Linux pbulkc7.ceas  bacon ~/Pkgsrc/pkgsrc-2019-03-25/math/py-Scientific 1030:

Interestingly, "bmake extract" or "bmake pbulk-index" trigger installation all python-related dependencies, so apparently the :sh construct is safe here and does not require wrapping in .if exists.

I would guess PLIST_SUBST isn't used until after build anyway, but I haven't verified this.

Thanks,

    JB


Home | Main Index | Thread Index | Old Index