[ARVADOS] created: 1.3.0-323-gd71e2f174

Git user git at public.curoverse.com
Fri Feb 15 11:30:38 EST 2019


        at  d71e2f174f9a58b315037750ac301225ec68e11f (commit)


commit d71e2f174f9a58b315037750ac301225ec68e11f
Author: Eric Biagiotti <ebiagiotti at veritasgenetcs.com>
Date:   Fri Feb 15 11:28:09 2019 -0500

    14853: Adds os.name check for subprocess conditional import
    
    Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti <eric.biagiotti at gmail.com>

diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py
index c3015753b..c0d165aa9 100644
--- a/sdk/cwl/arvados_cwl/runner.py
+++ b/sdk/cwl/arvados_cwl/runner.py
@@ -13,13 +13,13 @@ from functools import partial
 import logging
 import json
 from collections import namedtuple
-if sys.version_info[0] < 3:
+from io import StringIO
+
+if os.name == "posix" and sys.version_info[0] < 3:
     import subprocess32 as subprocess
 else:
     import subprocess
 
-from io import StringIO
-
 from schema_salad.sourceline import SourceLine, cmap
 
 from cwltool.command_line_tool import CommandLineTool
diff --git a/sdk/python/arvados/commands/keepdocker.py b/sdk/python/arvados/commands/keepdocker.py
index 062545beb..ac387a6f6 100644
--- a/sdk/python/arvados/commands/keepdocker.py
+++ b/sdk/python/arvados/commands/keepdocker.py
@@ -16,14 +16,14 @@ import tempfile
 import shutil
 import _strptime
 import fcntl
-if sys.version_info[0] < 3:
+from operator import itemgetter
+from stat import *
+
+if os.name == "posix" and sys.version_info[0] < 3:
     import subprocess32 as subprocess
 else:
     import subprocess
 
-from operator import itemgetter
-from stat import *
-
 import arvados
 import arvados.util
 import arvados.commands._util as arv_cmd

commit 13fa76866cc2266812df44c410cd5cdfe16d5e73
Author: chapmanb <chapmanb at 50mail.com>
Date:   Thu Feb 14 11:23:39 2019 -0500

    Python 3: only import subprocess32 on py27
    
    Avoids the need to install and import subprocess32 when working
    with any recent Python 3.x version. This helps with bioconda
    install since subprocess32 is not built for py3.
    
    Arvados-DCO-1.1-Signed-off-by: Brad Chapman <chapmanb at fastmail.com>

diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py
index ad8e903ba..c3015753b 100644
--- a/sdk/cwl/arvados_cwl/runner.py
+++ b/sdk/cwl/arvados_cwl/runner.py
@@ -7,12 +7,16 @@ standard_library.install_aliases()
 from future.utils import  viewvalues, viewitems
 
 import os
+import sys
 import urllib.parse
 from functools import partial
 import logging
 import json
-import subprocess32 as subprocess
 from collections import namedtuple
+if sys.version_info[0] < 3:
+    import subprocess32 as subprocess
+else:
+    import subprocess
 
 from io import StringIO
 
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index 22c49a01b..a815dedaf 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -40,8 +40,10 @@ setup(name='arvados-cwl-runner',
           'arvados-python-client>=1.3.0.20190205182514',
           'setuptools',
           'ciso8601 >=1.0.6, <2.0.0',
-          'subprocess32>=3.5.1',
       ],
+      extras_require={
+          ':os.name=="posix" and python_version<"3"': ['subprocess32 >= 3.5.1'],
+      },
       data_files=[
           ('share/doc/arvados-cwl-runner', ['LICENSE-2.0.txt', 'README.rst']),
       ],
diff --git a/sdk/python/arvados/commands/keepdocker.py b/sdk/python/arvados/commands/keepdocker.py
index 811f096c6..062545beb 100644
--- a/sdk/python/arvados/commands/keepdocker.py
+++ b/sdk/python/arvados/commands/keepdocker.py
@@ -10,13 +10,16 @@ import errno
 import json
 import os
 import re
-import subprocess32 as subprocess
 import sys
 import tarfile
 import tempfile
 import shutil
 import _strptime
 import fcntl
+if sys.version_info[0] < 3:
+    import subprocess32 as subprocess
+else:
+    import subprocess
 
 from operator import itemgetter
 from stat import *
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index 5c781b158..aaa071033 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -54,8 +54,10 @@ setup(name='arvados-python-client',
           'ruamel.yaml >=0.15.54, <=0.15.77',
           'setuptools',
           'ws4py >=0.4.2',
-          'subprocess32 >=3.5.1',
       ],
+      extras_require={
+          ':os.name=="posix" and python_version<"3"': ['subprocess32 >= 3.5.1'],
+      },
       classifiers=[
           'Programming Language :: Python :: 2',
           'Programming Language :: Python :: 3',

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list