[arch-commits] Commit in python-pytorch/trunk (PKGBUILD noplt.patch)

Sven-Hendrik Haase svenstaro at archlinux.org
Mon May 7 15:21:07 UTC 2018


    Date: Monday, May 7, 2018 @ 15:21:06
  Author: svenstaro
Revision: 319126

upgpkg: python-pytorch 0.4.0-1

Added:
  python-pytorch/trunk/noplt.patch
Modified:
  python-pytorch/trunk/PKGBUILD

-------------+
 PKGBUILD    |   28 ++++++++++++++++------------
 noplt.patch |   13 +++++++++++++
 2 files changed, 29 insertions(+), 12 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-05-07 15:17:35 UTC (rev 319125)
+++ PKGBUILD	2018-05-07 15:21:06 UTC (rev 319126)
@@ -4,9 +4,9 @@
 pkgbase="python-pytorch"
 pkgname=("python-pytorch" "python2-pytorch" "python-pytorch-cuda" "python2-pytorch-cuda")
 _pkgname="pytorch"
-_commit=2b47480
-pkgver=0.3.1
-pkgrel=2
+_commit=200fb22
+pkgver=0.4.0
+pkgrel=1
 pkgdesc="Tensors and Dynamic neural networks in Python with strong GPU acceleration"
 arch=('x86_64')
 url="http://pytorch.org"
@@ -13,19 +13,23 @@
 license=('BSD')
 makedepends=('python' 'python-setuptools' 'python2' 'python2-setuptools'
              'python-yaml' 'python2-yaml' 'python-numpy' 'python2-numpy'
-             'gcc6' 'cmake' 'cuda' 'cudnn' 'git')
+             'gcc5' 'cmake' 'cuda' 'cudnn' 'git' 'python2-typing')
 source=("${_pkgname}-${pkgver}::git+https://github.com/pytorch/pytorch.git#commit=$_commit"
         "git://github.com/facebookincubator/gloo"
         "git://github.com/pybind/pybind11"
-        "git://github.com/nanopb/nanopb")
+        "git://github.com/nanopb/nanopb"
+        noplt.patch)
 sha256sums=('SKIP'
             'SKIP'
             'SKIP'
-            'SKIP')
+            'SKIP'
+            '8e845663abbbd78bd4d3fcb8997b85c644a09470b166ed3a95429636670eb4ef')
 
 prepare() {
   cd "${_pkgname}-${pkgver}"
 
+  patch -Np1 -i "${srcdir}"/noplt.patch
+
   git submodule init
   git config submodule."torch/lib/gloo".url ${srcdir}/gloo
   git config submodule."torch/lib/pybind11".url ${srcdir}/pybind11
@@ -67,10 +71,10 @@
   cd "$srcdir/${_pkgname}-${pkgver}-py2-cuda"
   # Uncomment and modify the following line to enable Intel MKL and magma support
   #CMAKE_PREFIX_PATH=/opt/intel/mkl/include:/opt/intel/mkl/lib/intel64:/opt/magma \
-  CC=gcc-6 \
-  CXX=g++-6 \
   CFLAGS="${CFLAGS/-fno-plt/}" \
   CXXFLAGS="${CXXFLAGS/-fno-plt/}" \
+  CC=gcc-5 \
+  CXX=g++-5 \
   WITH_CUDA=1 \
   CUDA_HOME=/opt/cuda \
   WITH_CUDNN=1 \
@@ -83,10 +87,10 @@
   cd "$srcdir/${_pkgname}-${pkgver}-py3-cuda"
   # Uncomment and modify the following line to enable Intel MKL and magma support
   #CMAKE_PREFIX_PATH=/opt/intel/mkl/include:/opt/intel/mkl/lib/intel64:/opt/magma \
-  CC=gcc-6 \
-  CXX=g++-6 \
   CFLAGS="${CFLAGS/-fno-plt/}" \
   CXXFLAGS="${CXXFLAGS/-fno-plt/}" \
+  CC=gcc-5 \
+  CXX=g++-5 \
   WITH_CUDA=1 \
   CUDA_HOME=/opt/cuda \
   WITH_CUDNN=1 \
@@ -97,7 +101,7 @@
 }
 
 package_python2-pytorch() {
-  depends+=('python2' 'python2-yaml' 'python2-numpy')
+  depends+=('python2' 'python2-yaml' 'python2-numpy' 'python2-typing')
   cd "$srcdir/${_pkgname}-${pkgver}-py2"
   python2 setup.py install --root="$pkgdir"/ --optimize=1 --skip-build
   install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
@@ -111,7 +115,7 @@
 }
 
 package_python2-pytorch-cuda() {
-  depends+=('python2' 'python2-yaml' 'python2-numpy' 'cuda' 'cudnn')
+  depends+=('python2' 'python2-yaml' 'python2-numpy' 'cuda' 'cudnn' 'python2-typing')
   provides=('python2-pytorch')
   conflicts=('python2-pytorch')
   cd "$srcdir/${_pkgname}-${pkgver}-py2-cuda"

Added: noplt.patch
===================================================================
--- noplt.patch	                        (rev 0)
+++ noplt.patch	2018-05-07 15:21:06 UTC (rev 319126)
@@ -0,0 +1,13 @@
+diff --git a/setup.py b/setup.py
+index 4fff8702d..cd2b19aab 100644
+--- a/setup.py
++++ b/setup.py
+@@ -182,7 +182,7 @@ import distutils.sysconfig
+ cfg_vars = distutils.sysconfig.get_config_vars()
+ for key, value in cfg_vars.items():
+     if type(value) == str:
+-        cfg_vars[key] = value.replace("-Wstrict-prototypes", "")
++        cfg_vars[key] = value.replace("-Wstrict-prototypes", "").replace("-fno-plt", "")
+ 
+ ################################################################################
+ # Custom build commands



More information about the arch-commits mailing list