gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-wallet-core] branch master updated: configure: imple


From: gnunet
Subject: [GNUnet-SVN] [taler-wallet-core] branch master updated: configure: implement --yarn
Date: Tue, 01 Oct 2019 19:32:48 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 2d60f76a configure: implement --yarn
2d60f76a is described below

commit 2d60f76abfd96bc44531cf3644eea3b16b6bb0f1
Author: ng0 <address@hidden>
AuthorDate: Tue Oct 1 17:32:29 2019 +0000

    configure: implement --yarn
---
 Makefile     |  2 +-
 configure    | 21 ++++++++++++---------
 configure.py | 20 +++++++++++++++-----
 3 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index 1e7d65e0..6fdb2552 100644
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@ lint: tsc yarn-install
 
 .PHONY: yarn-install
 yarn-install:
-       yarn install
+       $(yarnexe) install
 
 
 .PHONY: i18n
diff --git a/configure b/configure
index ab64c25c..8d7d333d 100755
--- a/configure
+++ b/configure
@@ -87,19 +87,22 @@ else
     fi
 fi
 
-if ! existence yarn; then
-    echo 'ERROR: yarn missing. See https://yarnpkg.com/en/docs/install'
-    exit 1
-fi
-
-if existence cmdtest; then
+if existence yarn; then
     if yarn help | grep "No such file or directory"; then
         echo "ERROR: wrong yarn binary installed, please remove the"
         echo "ERROR: conflicting binary before continuing."
+        if existence cmdtest; then
+            echo "WARNING: cmdtest is installed, this can lead"
+            echo "WARNING: to know issues with yarn."
+        fi
         exit 1
     fi
-    echo "WARNING: cmdtest is installed, this can lead to known issues"
-    echo "WARNING: with yarn."
+    myyarn="yarn"
+elif existence yarnpkg; then
+    myyarn="yarnpkg"
+else
+    echo 'ERROR: yarn missing. See https://yarnpkg.com/en/docs/install'
+    exit 1
 fi
 
 # for the weird systems and sandboxes, only as a anotice.
@@ -119,4 +122,4 @@ fi
 # If $1 is empty, the python script checks the
 # environment for PREFIX. We might need more
 # variables and switches, such as DESTDIR.
-$PYTHON ./configure.py $@
+$PYTHON ./configure.py --yarn=$myyarn $@
diff --git a/configure.py b/configure.py
index 1e813e0d..3abef380 100644
--- a/configure.py
+++ b/configure.py
@@ -44,26 +44,36 @@ def _read_prefix():
             return myprefix
 
     else:
-        logger.debug('PREFIX from argv')
+        # logger.debug('PREFIX from argv')
         parser = argparse.ArgumentParser()
         parser.add_argument("-p",
                             "--prefix",
                             type=str,
                             required=True,
                             help='Directory prefix for installation')
-        logger.debug('parser.parse_args step')
+        parser.add_argument("-y",
+                            "--yarn",
+                            type=str,
+                            required=True,
+                            help='name of yarn executable')
+        # logger.debug('parser.parse_args step')
         args = parser.parse_args()
-        logger.debug('%s', args)
+        # logger.debug('%s', args)
         myprefix = args.prefix
+        yarnexe = args.yarn
         # if args.prefix is not None and os.path.isdir(myprefix) is True:
         if args.prefix and os.path.isdir(myprefix) is True:
-            return myprefix
+            return [myprefix, yarnexe];
 
 def main():
-    myprefix = str(_read_prefix())
+    # mylist = str(_read_prefix())
+    mylist = _read_prefix()
+    myprefix = mylist[0]
+    yarnexe = mylist[1]
     f = open('config.mk', 'w+')
     f.write('# this file is autogenerated by ./configure\n')
     f.write('prefix=' + myprefix + '\n')
+    f.write('yarnexe=' + yarnexe + '\n')
     f.close()
 
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]