summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorHervé Yviquel <hyviquel@gmail.com>2020-11-01 13:08:06 -0300
committerGitHub <noreply@github.com>2020-11-01 10:08:06 -0600
commitf62efe5e2eb73a4fb45d99a6e73d834bc9af8b56 (patch)
tree288b8158f6730a90a199b3e6af3611d1a89e11c8 /var
parentffd5f6b19614da9862a28a4b772a74bae84f161c (diff)
downloadspack-f62efe5e2eb73a4fb45d99a6e73d834bc9af8b56.tar.gz
spack-f62efe5e2eb73a4fb45d99a6e73d834bc9af8b56.tar.bz2
spack-f62efe5e2eb73a4fb45d99a6e73d834bc9af8b56.tar.xz
spack-f62efe5e2eb73a4fb45d99a6e73d834bc9af8b56.zip
Fix rdma-core package installation (#19643)
* add python-docutils dependency * adds symlink to script for better compatibility if py-docutils installation * Improve post_install phase of py-docutils Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * fix review of rdma-core package * improve formating of py-docutils package Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-docutils/package.py12
-rw-r--r--var/spack/repos/builtin/packages/rdma-core/package.py1
2 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-docutils/package.py b/var/spack/repos/builtin/packages/py-docutils/package.py
index 573ecc6bae..07b0da2534 100644
--- a/var/spack/repos/builtin/packages/py-docutils/package.py
+++ b/var/spack/repos/builtin/packages/py-docutils/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
+import os
class PyDocutils(PythonPackage):
@@ -39,3 +40,14 @@ class PyDocutils(PythonPackage):
depends_on('python@2.2.1:3', when='@0.6:0.9', type=('build', 'run'))
depends_on('python@2.2.1:2.8', when='@0.5.0:0.5.999', type=('build', 'run'))
depends_on('python@2.1:2.8', when='@:0.4', type=('build', 'run'))
+
+ # NOTE: This creates symbolic links to be able to run docutils scripts
+ # without .py file extension similarly to various linux distributions to
+ # increase compatibility with other packages
+ @run_after('install')
+ def post_install(self):
+ bin_path = self.prefix.bin
+ for file in os.listdir(bin_path):
+ if file.endswith(".py"):
+ os.symlink(os.path.join(bin_path, file),
+ os.path.join(bin_path, file[:-3]))
diff --git a/var/spack/repos/builtin/packages/rdma-core/package.py b/var/spack/repos/builtin/packages/rdma-core/package.py
index 79f12d98de..0e09e7d210 100644
--- a/var/spack/repos/builtin/packages/rdma-core/package.py
+++ b/var/spack/repos/builtin/packages/rdma-core/package.py
@@ -26,6 +26,7 @@ class RdmaCore(CMakePackage):
version('13', sha256='e5230fd7cda610753ad1252b40a28b1e9cf836423a10d8c2525b081527760d97')
depends_on('pkgconfig', type='build')
+ depends_on('py-docutils', type='build')
depends_on('libnl')
conflicts('platform=darwin', msg='rdma-core requires FreeBSD or Linux')
conflicts('%intel', msg='rdma-core cannot be built with intel (use gcc instead)')