On Thu, Oct 15, 2020 at 01:52:31AM -0400, James Cook wrote: > On October 15, 2020 12:28:01 a.m. EDT, Daniel Dickman <[email protected]> > wrote: > >Does the diff below work for you? > > Probably not; when I ran make test earlier with a similar diff I found > it needs the Python library threadpoolctl which is not yet on ports. > However there is an intermediate version that works with 3.8 and doesn't > need threadpoolctl. I will look at my WIP diff tomorrow when I'm at my > computer.
Here's my work in progress. I don't know if I'll be able to resume work before the weekend so feel free to pick it up. Some notes about the change; lines starting ! might be relevant for the commit message: * Paul prefers the latest version, so I stuck with 0.23.2 even though it requires new ports. * It's not finished: sysutils/py-threadpoolctl doesn't exist. Of course I haven't updated PLIST. ! The new deps are based on doc/developers/advanced_installation.rst from the source. I haven't verified that they work. ! I removed SKLEARN_NO_OPENMP=1 because that was removed in scikit-learn commit 9876f748. * I don't know what the WANTLIB line does but copied it from Daniel's patch in case it's important. ! This fixes on incompatibility with Python 3.8 in the included cloudpickle source; see https://github.com/cloudpipe/cloudpickle/issues/266. Before this change, simply importing sklearn in python3.8 led to an error: >>> import sklearn ... TypeError: an integer is required (got type bytes) James diff --git math/py-scikit-learn/Makefile math/py-scikit-learn/Makefile index 2e8eaf55e6b..faa066c041b 100644 --- math/py-scikit-learn/Makefile +++ math/py-scikit-learn/Makefile @@ -2,10 +2,9 @@ COMMENT = set of python modules for machine learning and data mining -MODPY_EGG_VERSION = 0.20.3 +MODPY_EGG_VERSION = 0.23.2 DISTNAME = scikit-learn-${MODPY_EGG_VERSION} PKGNAME = py-${DISTNAME} -REVISION = 3 CATEGORIES = math @@ -16,6 +15,8 @@ MAINTAINER = Paul Irofti <[email protected]> # BSD-3 PERMIT_PACKAGE = Yes +WANTLIB += ${COMPILER_LIBCXX} m + MODULES = lang/python MODPY_PI = Yes @@ -26,13 +27,16 @@ MODPY_SETUPTOOLS = Yes FLAVORS = python3 FLAVOR = python3 -BUILD_DEPENDS = math/py-numpy${MODPY_FLAVOR} +BUILD_DEPENDS = lang/cython${MODPY_FLAVOR} \ + math/py-numpy${MODPY_FLAVOR} \ + math/py-scipy${MODPY_FLAVOR} \ + sysutils/py-joblib${MODPY_FLAVOR} \ + sysutils/py-threadpoolctl${MODPY_FLAVOR} RUN_DEPENDS = math/py-numpy${MODPY_FLAVOR} \ math/py-scipy${MODPY_FLAVOR} \ - sysutils/py-joblib${MODPY_FLAVOR} -TEST_DEPENDS = lang/cython${MODPY_FLAVOR} - -MAKE_ENV += SKLEARN_NO_OPENMP=1 + sysutils/py-joblib${MODPY_FLAVOR} \ + sysutils/py-threadpoolctl${MODPY_FLAVOR} +TEST_DEPENDS = math/py-pandas${MODPY_FLAVOR} pre-test: cp -r ${WRKSRC}/sklearn/datasets/{data,descr} \ diff --git math/py-scikit-learn/distinfo math/py-scikit-learn/distinfo index 7ff6978b094..5571636dfef 100644 --- math/py-scikit-learn/distinfo +++ math/py-scikit-learn/distinfo @@ -1,2 +1,2 @@ -SHA256 (scikit-learn-0.20.3.tar.gz) = xQOAKoHeGLi01A0Gn142N5XuRLFgXzi8EEFgyjv+LEE= -SIZE (scikit-learn-0.20.3.tar.gz) = 11818490 +SHA256 (scikit-learn-0.23.2.tar.gz) = IHZvUV5s1vlUVUOH365wXZPHtUTsDmxqXY4Ab29+9IA= +SIZE (scikit-learn-0.23.2.tar.gz) = 7155833
