Merge pull request #10981 from MehdiChinoune/scikit-learn-update
python-scikit-learn: update to 1.0.2
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
--- scikit-learn-0.21.2/sklearn/_build_utils/openmp_helpers.py.orig 2019-06-14 15:31:08.101027100 +0300
|
||||
+++ scikit-learn-0.21.2/sklearn/_build_utils/openmp_helpers.py 2019-06-14 15:33:57.720728800 +0300
|
||||
@@ -36,7 +36,7 @@
|
||||
--- a/sklearn/_build_utils/openmp_helpers.py
|
||||
+++ b/sklearn/_build_utils/openmp_helpers.py
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
if sys.platform == "win32" and ('icc' in compiler or 'icl' in compiler):
|
||||
return ['/Qopenmp']
|
||||
if sys.platform == "win32" and ("icc" in compiler or "icl" in compiler):
|
||||
return ["/Qopenmp"]
|
||||
- elif sys.platform == "win32":
|
||||
+ elif sys.platform == "win32" and not 'GCC' in sys.version:
|
||||
return ['/openmp']
|
||||
elif sys.platform == "darwin" and ('icc' in compiler or 'icl' in compiler):
|
||||
return ['-openmp']
|
||||
return ["/openmp"]
|
||||
elif sys.platform in ("darwin", "linux") and "icc" in compiler:
|
||||
return ["-qopenmp"]
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
To prevent rmtree() erroring out because of external file scanners
|
||||
--- scikit-learn-0.21.3/sklearn/_build_utils/pre_build_helpers.py.orig 2019-08-15 10:23:10.181641800 +0200
|
||||
+++ scikit-learn-0.21.3/sklearn/_build_utils/pre_build_helpers.py 2019-08-15 10:30:40.014055300 +0200
|
||||
@@ -7,6 +7,7 @@
|
||||
--- a/sklearn/_build_utils/pre_build_helpers.py
|
||||
+++ b/sklearn/_build_utils/pre_build_helpers.py
|
||||
@@ -3,6 +3,7 @@
|
||||
import os
|
||||
import sys
|
||||
import glob
|
||||
+import time
|
||||
import tempfile
|
||||
import textwrap
|
||||
import subprocess
|
||||
@@ -54,6 +55,7 @@
|
||||
import setuptools # noqa
|
||||
@@ -93,6 +93,7 @@
|
||||
raise
|
||||
finally:
|
||||
os.chdir(start_dir)
|
||||
|
||||
@@ -6,25 +6,27 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=0.22.2.post1
|
||||
pkgrel=2
|
||||
pkgver=1.0.2
|
||||
pkgrel=1
|
||||
pkgdesc="A set of python modules for machine learning and data mining (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
|
||||
url='https://scikit-learn.sourceforge.io/'
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
|
||||
url='https://scikit-learn.org'
|
||||
license=('BSD')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-numpy"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-scipy"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-joblib")
|
||||
"${MINGW_PACKAGE_PREFIX}-python-joblib"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-threadpoolctl")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
||||
"${MINGW_PACKAGE_PREFIX}-cython"
|
||||
"${MINGW_PACKAGE_PREFIX}-cc")
|
||||
source=("${_realname}-${pkgver}.tar.gz::https://github.com/scikit-learn/${_realname}/archive/${pkgver}.tar.gz"
|
||||
001-mingw-python-openmp-flag.patch
|
||||
002-openmp-cleanup-wait.patch)
|
||||
sha256sums=('c6c57326941b1854112e6730961f31995ea60fa254e79daae1994e4cd5cb6f44'
|
||||
'11c9fedec28d882c25c90087ec3ef09f022dfd83c308574d023c89d19b5520f0'
|
||||
'6d4c0d35d09f87da3993634e1a1e9f89a14179fb75b1ee28e1a2a714bc70346f')
|
||||
sha256sums=('34471662f0e5ba8d2c799391338c6f976680cc66b715e00db0c7589f4f371bc4'
|
||||
'88e693d40aded60033737ca8bbfe7850ab73a3e05941bc25247f3eaa50850dd5'
|
||||
'd2479335dff939c03662028145c81556e8d6ceef9bcbfbe688993b62faddb8a1')
|
||||
|
||||
prepare() {
|
||||
cd ${_realname}-${pkgver}
|
||||
@@ -32,18 +34,18 @@ prepare() {
|
||||
patch -p1 -i ${srcdir}/002-openmp-cleanup-wait.patch
|
||||
|
||||
cd ${srcdir}
|
||||
rm -rf python-build-${CARCH} | true
|
||||
cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
|
||||
rm -rf python-build-${MSYSTEM} | true
|
||||
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
|
||||
}
|
||||
|
||||
build() {
|
||||
msg "Python build for ${CARCH}"
|
||||
cd "${srcdir}/python-build-${CARCH}"
|
||||
msg "Python build for ${MSYSTEM}"
|
||||
cd "${srcdir}/python-build-${MSYSTEM}"
|
||||
${MINGW_PREFIX}/bin/python setup.py build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/python-build-${CARCH}"
|
||||
cd "${srcdir}/python-build-${MSYSTEM}"
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
|
||||
--root="${pkgdir}" --optimize=1 --skip-build
|
||||
|
||||
37
mingw-w64-python-threadpoolctl/PKGBUILD
Normal file
37
mingw-w64-python-threadpoolctl/PKGBUILD
Normal file
@@ -0,0 +1,37 @@
|
||||
# Contributor: Mehdi Chinoune <mehdi.chinoune@hotmail.com>
|
||||
|
||||
_realname=threadpoolctl
|
||||
pkgbase=mingw-w64-python-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
||||
pkgver=3.1.0
|
||||
pkgrel=1
|
||||
pkgdesc="Python helpers to limit the number of threads used in native libraries that handle their own internal threadpool (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
|
||||
url="https://github.com/joblib/threadpoolctl"
|
||||
license=('BSD')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-flit-core")
|
||||
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
|
||||
sha256sums=('a335baacfaa4400ae1f0d8e3a58d6674d2f8828e3716bb2802c44955ad391380')
|
||||
|
||||
build() {
|
||||
msg "Python build for ${MSYSTEM}"
|
||||
cd "${srcdir}"
|
||||
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
|
||||
|
||||
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
|
||||
}
|
||||
|
||||
package() {
|
||||
msg "Python install for ${MSYSTEM}"
|
||||
cd "${srcdir}/python-build-${MSYSTEM}"
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
|
||||
--destdir="${pkgdir}" dist/*.whl
|
||||
|
||||
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
|
||||
}
|
||||
Reference in New Issue
Block a user