gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-taler-build-scripts] branch master updated (35fb308


From: gnunet
Subject: [GNUnet-SVN] [taler-taler-build-scripts] branch master updated (35fb308 -> b2ad1a4)
Date: Fri, 04 Oct 2019 16:02:53 +0200

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

ng0 pushed a change to branch master
in repository taler-build-scripts.

    from 35fb308  should print debug
     new cadf5c6  f-strings + writelines
     new b2ad1a4  remove ifelse branches

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configure.py | 65 ++++++++++++++++++++++++++++++------------------------------
 1 file changed, 32 insertions(+), 33 deletions(-)

diff --git a/configure.py b/configure.py
index cb92e0d..68b9176 100644
--- a/configure.py
+++ b/configure.py
@@ -36,42 +36,41 @@ def _read_prefix():
     logging.basicConfig(level=logging.DEBUG)
     logger = logging.getLogger(__name__)
 
+
+    if 'DEBUG' in os.environ:
+        logger.debug('PREFIX from argv')
+    parser = argparse.ArgumentParser()
+    parser.add_argument("-p",
+                        "--prefix",
+                        type=str,
+                        default="/usr/local",
+                        # required=True,
+                        help='Directory prefix for installation')
+    parser.add_argument("-y",
+                        "--yarn",
+                        type=str,
+                        required=True,
+                        help='name of yarn executable')
+    if 'DEBUG' in os.environ:
+        logger.debug('parser.parse_args step')
+    args = parser.parse_args()
+    if 'DEBUG' in os.environ:
+        logger.debug('%s', args)
     if 'PREFIX' in os.environ:
         if 'DEBUG' in os.environ:
             logger.debug('PREFIX from environment')
-        myprefix = os.environ.get('PREFIX')
-        if myprefix is not None and os.path.isdir(myprefix) is True:
+        p_myprefix = os.environ.get('PREFIX')
+        if p_myprefix is not None and os.path.isdir(p_myprefix) is True:
             if 'DEBUG' in os.environ:
-                logger.debug('PREFIX from environment: %s', myprefix)
-            return myprefix
-
+                logger.debug('PREFIX from environment: %s', p_myprefix)
+            myprefix = p_myprefix
     else:
-        if 'DEBUG' in os.environ:
-            logger.debug('PREFIX from argv')
-        parser = argparse.ArgumentParser()
-        parser.add_argument("-p",
-                            "--prefix",
-                            type=str,
-                            default="/usr/local",
-                            # required=True,
-                            help='Directory prefix for installation')
-        parser.add_argument("-y",
-                            "--yarn",
-                            type=str,
-                            required=True,
-                            help='name of yarn executable')
-        if 'DEBUG' in os.environ:
-            logger.debug('parser.parse_args step')
-        args = parser.parse_args()
-        if 'DEBUG' in os.environ:
-            logger.debug('%s', args)
         myprefix = args.prefix
-        yarnexe = args.yarn
-        if 'DEBUG' in os.environ:
-            logger.debug('%s', repr(myprefix))
-        # 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, yarnexe];
+    yarnexe = args.yarn
+    if 'DEBUG' in os.environ:
+        logger.debug('%s', repr(myprefix))
+    if args.prefix and os.path.isdir(myprefix) is True:
+        return [myprefix, yarnexe];
 
 def main():
     # mylist = str(_read_prefix())
@@ -79,9 +78,9 @@ def main():
     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.writelines(['# this file is autogenerated by ./configure\n',
+                  'prefix={myprefix}\n',
+                  '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]