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

Sven-Hendrik Haase svenstaro at archlinux.org
Sat Jan 11 17:36:30 UTC 2020


    Date: Saturday, January 11, 2020 @ 17:36:30
  Author: svenstaro
Revision: 551969

upgpkg: python-pytorch 1.3.1-8: Try fixing FS#64981

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

--------------------------+
 PKGBUILD                 |   10 +++++++---
 fix_include_system.patch |   11 +++++++++++
 2 files changed, 18 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-01-11 17:19:15 UTC (rev 551968)
+++ PKGBUILD	2020-01-11 17:36:30 UTC (rev 551969)
@@ -5,7 +5,7 @@
 pkgname=("python-pytorch" "python-pytorch-opt" "python-pytorch-cuda" "python-pytorch-opt-cuda")
 _pkgname="pytorch"
 pkgver=1.3.1
-pkgrel=7
+pkgrel=8
 pkgdesc="Tensors and Dynamic neural networks in Python with strong GPU acceleration"
 arch=('x86_64')
 url="https://pytorch.org"
@@ -12,8 +12,10 @@
 license=('BSD')
 depends=('google-glog' 'gflags' 'opencv' 'openmp' 'nccl' 'pybind11' 'python' 'python-yaml' 'python-numpy' 'protobuf' 'ffmpeg' 'python-future' 'qt5-base')
 makedepends=('python' 'python-setuptools' 'python-yaml' 'python-numpy' 'cmake' 'cuda' 'cudnn' 'git' 'magma')
-source=("${_pkgname}-${pkgver}::git+https://github.com/pytorch/pytorch.git#tag=v$pkgver")
-sha256sums=('SKIP')
+source=("${_pkgname}-${pkgver}::git+https://github.com/pytorch/pytorch.git#tag=v$pkgver"
+        fix_include_system.patch)
+sha256sums=('SKIP'
+            '147bdaeac8ec46ea46382e6146878bd8f8d51e05d5bd6f930dfd8e2b520859b9')
 
 get_pyver () {
   python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
@@ -36,6 +38,8 @@
   # https://github.com/pytorch/pytorch/issues/28060
   find -name '*.cpp' -exec sed -i '/tp_print/s/nullptr/0/' {} +
 
+  patch -N torch/utils/cpp_extension.py "${srcdir}"/fix_include_system.patch
+
   cd ..
 
   cp -a "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-opt"

Added: fix_include_system.patch
===================================================================
--- fix_include_system.patch	                        (rev 0)
+++ fix_include_system.patch	2020-01-11 17:36:30 UTC (rev 551969)
@@ -0,0 +1,11 @@
+--- a/utils/cpp_extension.py	2019-12-29 12:59:36.083692770 -0300
++++ b/utils/cpp_extension.py	2020-01-08 09:52:16.435316701 -0300
+@@ -1098,7 +1098,7 @@
+     if BUILD_NAMEDTENSOR:
+         common_cflags.append('-DBUILD_NAMEDTENSOR')
+     common_cflags += ['-I{}'.format(include) for include in user_includes]
+-    common_cflags += ['-isystem {}'.format(include) for include in system_includes]
++    common_cflags += ['-I{}'.format(include) for include in system_includes]
+ 
+     common_cflags += ['-D_GLIBCXX_USE_CXX11_ABI=' + str(int(torch._C._GLIBCXX_USE_CXX11_ABI))]
+



More information about the arch-commits mailing list