tech-pkg archive

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

Re: py-Scientific fix



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.

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?

--- Makefile    13 Dec 2018 19:52:09 -0000    1.54
+++ Makefile    27 Mar 2019 23:35:50 -0000
@@ -14,8 +14,11 @@

 MAKE_ENV+=    NETCDF_PREFIX=${BUILDLINK_PREFIX.netcdf}

-PLIST_SUBST+=    OSNAME=${LOWER_OPSYS:S/solaris/sunos/}
-PLIST_SUBST+=    OSVER=${OS_VERSION:C/^(.).*/\1/}
+.include "../../lang/python/pyversion.mk"
+
+PYPLAT_CMD=    ${PYTHONBIN} -c "import sys; print sys.platform"
+PLIST_SUBST+=    PYPLAT=${PYPLAT_CMD:sh}
+
 PYTHON_VERSIONS_INCOMPATIBLE=    34 35 36 37 # not yet ported as of 2.8.1

 INSTALLATION_DIRS=    bin
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/math/py-Scientific/PLIST,v
retrieving revision 1.10
diff -u -r1.10 PLIST
--- PLIST    25 Sep 2014 12:59:30 -0000    1.10
+++ PLIST    27 Mar 2019 23:35:50 -0000
@@ -223,8 +223,8 @@
 ${PYSITELIB}/Scientific/indexing.py
 ${PYSITELIB}/Scientific/indexing.pyc
 ${PYSITELIB}/Scientific/indexing.pyo
-${PYSITELIB}/Scientific/${OSNAME}${OSVER}/Scientific_affinitypropagation.so
-${PYSITELIB}/Scientific/${OSNAME}${OSVER}/Scientific_interpolation.so
-${PYSITELIB}/Scientific/${OSNAME}${OSVER}/Scientific_netcdf.so
-${PYSITELIB}/Scientific/${OSNAME}${OSVER}/Scientific_numerics_package_id.so
-${PYSITELIB}/Scientific/${OSNAME}${OSVER}/Scientific_vector.so
+${PYSITELIB}/Scientific/${PYPLAT}/Scientific_affinitypropagation.so
+${PYSITELIB}/Scientific/${PYPLAT}/Scientific_interpolation.so
+${PYSITELIB}/Scientific/${PYPLAT}/Scientific_netcdf.so
+${PYSITELIB}/Scientific/${PYPLAT}/Scientific_numerics_package_id.so
+${PYSITELIB}/Scientific/${PYPLAT}/Scientific_vector.so



Home | Main Index | Thread Index | Old Index