[arch-commits] Commit in python-scikit-learn/repos (3 files)

Felix Yan felixonmars at archlinux.org
Sun Jul 8 12:48:37 UTC 2018


    Date: Sunday, July 8, 2018 @ 12:48:36
  Author: felixonmars
Revision: 354813

archrelease: copy trunk to community-staging-x86_64

Added:
  python-scikit-learn/repos/community-staging-x86_64/
  python-scikit-learn/repos/community-staging-x86_64/10342.patch
    (from rev 354812, python-scikit-learn/trunk/10342.patch)
  python-scikit-learn/repos/community-staging-x86_64/PKGBUILD
    (from rev 354812, python-scikit-learn/trunk/PKGBUILD)

-------------+
 10342.patch |   34 ++++++++++++++++++++++++++
 PKGBUILD    |   74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+)

Copied: python-scikit-learn/repos/community-staging-x86_64/10342.patch (from rev 354812, python-scikit-learn/trunk/10342.patch)
===================================================================
--- community-staging-x86_64/10342.patch	                        (rev 0)
+++ community-staging-x86_64/10342.patch	2018-07-08 12:48:36 UTC (rev 354813)
@@ -0,0 +1,34 @@
+diff -urN scikit-learn-0.19.1-orig/sklearn/metrics/cluster/setup.py scikit-learn-0.19.1/sklearn/metrics/cluster/setup.py
+--- scikit-learn-0.19.1-orig/sklearn/metrics/cluster/setup.py	2018-05-10 13:03:30.982433283 +0200
++++ scikit-learn-0.19.1/sklearn/metrics/cluster/setup.py	2018-05-10 13:08:30.205392486 +0200
+@@ -5,7 +5,7 @@
+ 
+ 
+ def configuration(parent_package="", top_path=None):
+-    config = Configuration("metrics/cluster", parent_package, top_path)
++    config = Configuration("cluster", parent_package, top_path)
+     libraries = []
+     if os.name == 'posix':
+         libraries.append('m')
+diff -urN scikit-learn-0.19.1-orig/sklearn/metrics/setup.py scikit-learn-0.19.1/sklearn/metrics/setup.py
+--- scikit-learn-0.19.1-orig/sklearn/metrics/setup.py	2018-05-10 13:03:30.982433283 +0200
++++ scikit-learn-0.19.1/sklearn/metrics/setup.py	2018-05-10 13:08:45.125595586 +0200
+@@ -14,6 +14,7 @@
+     if os.name == 'posix':
+         cblas_libs.append('m')
+ 
++    config.add_subpackage('cluster')
+     config.add_extension("pairwise_fast",
+                          sources=["pairwise_fast.pyx"],
+                          include_dirs=[os.path.join('..', 'src', 'cblas'),
+diff -urN scikit-learn-0.19.1-orig/sklearn/setup.py scikit-learn-0.19.1/sklearn/setup.py
+--- scikit-learn-0.19.1-orig/sklearn/setup.py	2018-05-10 13:03:30.945766331 +0200
++++ scikit-learn-0.19.1/sklearn/setup.py	2018-05-10 13:08:53.652377292 +0200
+@@ -51,7 +51,6 @@
+     config.add_subpackage('feature_extraction')
+     config.add_subpackage('manifold')
+     config.add_subpackage('metrics')
+-    config.add_subpackage('metrics/cluster')
+     config.add_subpackage('neighbors')
+     config.add_subpackage('tree')
+     config.add_subpackage('svm')

Copied: python-scikit-learn/repos/community-staging-x86_64/PKGBUILD (from rev 354812, python-scikit-learn/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2018-07-08 12:48:36 UTC (rev 354813)
@@ -0,0 +1,74 @@
+# $Id$
+# Maintainer: Andrzej Giniewicz <gginiu at gmail.com>
+
+pkgbase=python-scikit-learn
+pkgname=('python2-scikit-learn' 'python-scikit-learn')
+pkgver=0.19.1
+pkgrel=4
+pkgdesc="A set of python modules for machine learning and data mining"
+arch=('x86_64')
+url="http://scikit-learn.sourceforge.net/"
+license=('BSD')
+makedepends=('python2-scipy' 'python-scipy' 'python2-setuptools' 'python-setuptools' 'cython' 'cython2')
+options=(!emptydirs)
+
+source=("https://github.com/scikit-learn/scikit-learn/archive/${pkgver}.tar.gz"
+        "10342.patch")
+md5sums=('8fce5acd7d2d12c45d3381bbfa953d61'
+         'd6bcd7551850dc1afb1c872b9b69eb24')
+
+prepare() {
+  cd "$srcdir"
+
+  # see https://github.com/scikit-learn/scikit-learn/issues/10342
+  # and https://github.com/scikit-learn/scikit-learn/pull/10851
+  patch -p 0 < 10342.patch
+
+  cp -a scikit-learn-$pkgver scikit-learn-py2-$pkgver
+  cd scikit-learn-py2-$pkgver
+
+  sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
+      -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+      -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
+      -i $(find . -name '*.py')
+}
+
+build() {
+  msg "Building Python2"
+  cd "$srcdir"/scikit-learn-py2-$pkgver
+  python2 setup.py build
+
+  msg "Building Python3"
+  cd "$srcdir"/scikit-learn-$pkgver
+  python setup.py build
+}
+
+package_python2-scikit-learn() {
+  depends=('python2-scipy')
+  optdepends=('python2-matplotlib: for examples with plotting')
+
+  cd "$srcdir"/scikit-learn-py2-$pkgver
+
+  python2 setup.py install --root="$pkgdir"/ --optimize=1
+
+  install -D COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+  # See FS#49651
+  install -d "$pkgdir"/usr/share/doc/$pkgname
+  cp -r doc/tutorial "$pkgdir"/usr/share/doc/$pkgname/tutorial
+}
+
+package_python-scikit-learn() {
+  depends=('python-scipy')
+  optdepends=('python-matplotlib: for examples with plotting')
+
+  cd "$srcdir"/scikit-learn-$pkgver
+
+  python setup.py install --root="$pkgdir"/ --optimize=1
+
+  install -D COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+  # See FS#49651
+  install -d "$pkgdir"/usr/share/doc/$pkgname
+  cp -r doc/tutorial "$pkgdir"/usr/share/doc/$pkgname/tutorial
+}



More information about the arch-commits mailing list