From acfb84ddf9dc7c13d2a295634ec14900f4c7401a Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Fri, 3 May 2019 17:58:32 +0000 Subject: Move math/rpy -> math/py-rpy --- math/py-rpy/files/patch-rpy_tools.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 math/py-rpy/files/patch-rpy_tools.py (limited to 'math/py-rpy/files/patch-rpy_tools.py') diff --git a/math/py-rpy/files/patch-rpy_tools.py b/math/py-rpy/files/patch-rpy_tools.py new file mode 100644 index 000000000000..3371df201690 --- /dev/null +++ b/math/py-rpy/files/patch-rpy_tools.py @@ -0,0 +1,35 @@ +--- rpy_tools.py ++++ rpy_tools.py +@@ -97,8 +97,7 @@ def get_R_VERSION(RHOME=None, force_exec=False): + if stat or len(output)<=0: + raise RuntimeError("Couldn't execute the R interpreter" + + " `%s'.\n" % rexec ) +- # edd 05 Apr 2006 version = re.search("R +([0-9]\.[0-9]\.[0-9])", output) +- version = re.search(" +([0-9]\.[0-9]\.[0-9])", output) ++ version = re.search(" +([0-9]+\.[0-9]+\.[0-9]+)", output) + if not version: + raise RuntimeError("Couldn't obtain version number from output\n" + "of `R --version'.\n") +@@ -143,3 +142,20 @@ def get_PYTHON_DIR(): + % PYTHON_DIR ) + + return PYTHON_DIR ++ ++def get_R_LAPACK_LIB_FLAGS(RHOME=get_R_HOME()): ++ """ ++ Determine the necessary link arguments for lapack ++ """ ++ rexec = os.path.join(RHOME, 'bin', 'R') ++ stat, output = getstatusoutput('"%s" CMD config LAPACK_LIBS' % rexec ) ++ if stat or len(output)<=0: ++ raise RuntimeError("Couldn't execute the R interpreter" + ++ " `%s'.\n" % rexec ) ++ ++ LAPACK_LIB_FLAGS = output.strip() ++ if not LAPACK_LIB_FLAGS: ++ raise RuntimeError("Couldn't obtain LAPACK_LIBS information from output\n" ++ "of `R CMD config LAPACK_LIBS'.\n") ++ ++ return LAPACK_LIB_FLAGS +diff --git setup.py setup.py +index cf0fa2e..4a1f840 100644 -- cgit v1.2.3