[med-svn] [cwltool] 02/06: New upstream version 1.0.20170114120503
Sascha Steinbiss
satta at debian.org
Sat Jan 14 12:58:49 UTC 2017
This is an automated email from the git hooks/post-receive script.
satta pushed a commit to branch master
in repository cwltool.
commit 1c49ced1c53e7b6d2343241b36bf9556705a7945
Author: Sascha Steinbiss <satta at debian.org>
Date: Sat Jan 14 12:50:27 2017 +0000
New upstream version 1.0.20170114120503
---
MANIFEST.in | 2 +-
PKG-INFO | 2 +-
cwltool.egg-info/PKG-INFO | 2 +-
cwltool.egg-info/SOURCES.txt | 2 +-
cwltool.egg-info/pbr.json | 1 -
cwltool.egg-info/requires.txt | 1 -
cwltool.py | 12 ++++++++++++
cwltool/main.py | 6 +++---
cwltool/pack.py | 14 +++++++++-----
cwltool/process.py | 10 ++++++----
setup.cfg | 2 +-
setup.py | 3 +--
12 files changed, 36 insertions(+), 21 deletions(-)
diff --git a/MANIFEST.in b/MANIFEST.in
index 713b22b..051df48 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1 +1 @@
-include gittaggers.py ez_setup.py Makefile
+include gittaggers.py ez_setup.py Makefile cwltool.py
diff --git a/PKG-INFO b/PKG-INFO
index 5cae014..eea3cfe 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: cwltool
-Version: 1.0.20170111193653
+Version: 1.0.20170114120503
Summary: Common workflow language reference implementation
Home-page: https://github.com/common-workflow-language/cwltool
Author: Common workflow language working group
diff --git a/cwltool.egg-info/PKG-INFO b/cwltool.egg-info/PKG-INFO
index 5cae014..eea3cfe 100644
--- a/cwltool.egg-info/PKG-INFO
+++ b/cwltool.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: cwltool
-Version: 1.0.20170111193653
+Version: 1.0.20170114120503
Summary: Common workflow language reference implementation
Home-page: https://github.com/common-workflow-language/cwltool
Author: Common workflow language working group
diff --git a/cwltool.egg-info/SOURCES.txt b/cwltool.egg-info/SOURCES.txt
index 885743c..74f153e 100644
--- a/cwltool.egg-info/SOURCES.txt
+++ b/cwltool.egg-info/SOURCES.txt
@@ -1,6 +1,7 @@
MANIFEST.in
Makefile
README.rst
+cwltool.py
ez_setup.py
gittaggers.py
setup.cfg
@@ -33,7 +34,6 @@ cwltool.egg-info/PKG-INFO
cwltool.egg-info/SOURCES.txt
cwltool.egg-info/dependency_links.txt
cwltool.egg-info/entry_points.txt
-cwltool.egg-info/pbr.json
cwltool.egg-info/requires.txt
cwltool.egg-info/top_level.txt
cwltool.egg-info/zip-safe
diff --git a/cwltool.egg-info/pbr.json b/cwltool.egg-info/pbr.json
deleted file mode 100644
index 2a5bfd6..0000000
--- a/cwltool.egg-info/pbr.json
+++ /dev/null
@@ -1 +0,0 @@
-{"is_release": false, "git_version": "92d59e6"}
\ No newline at end of file
diff --git a/cwltool.egg-info/requires.txt b/cwltool.egg-info/requires.txt
index 0ff00f7..eaeae5f 100644
--- a/cwltool.egg-info/requires.txt
+++ b/cwltool.egg-info/requires.txt
@@ -5,4 +5,3 @@ rdflib >= 4.2.0, < 4.3.0
shellescape >= 3.4.1, < 3.5
schema-salad >= 2.2.20170111180227, < 3
typing >= 3.5.2, < 3.6
-cwltest >= 1.0.20161227194859
diff --git a/cwltool.py b/cwltool.py
new file mode 100755
index 0000000..a3b9c69
--- /dev/null
+++ b/cwltool.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+"""Convienance entry point for cwltool.
+
+This can be used instead of the recommended method of `./setup.py install`
+or `./setup.py develop` and then using the generated `cwltool` executable.
+"""
+
+import sys
+from cwltool import main
+
+if __name__ == "__main__":
+ sys.exit(main.main(sys.argv[1:]))
diff --git a/cwltool/main.py b/cwltool/main.py
index 75e2611..35c4f2e 100755
--- a/cwltool/main.py
+++ b/cwltool/main.py
@@ -499,7 +499,7 @@ def makeRelative(base, ob):
else:
if u.startswith("file://"):
u = uri_file_path(u)
- ob["location"] = os.path.relpath(u, base)
+ ob["location"] = os.path.relpath(u, base)
def printdeps(obj, document_loader, stdout, relative_deps, uri, basedir=None):
# type: (Dict[Text, Any], Loader, IO[Any], bool, Text, Text) -> None
@@ -517,9 +517,9 @@ def printdeps(obj, document_loader, stdout, relative_deps, uri, basedir=None):
if relative_deps:
if relative_deps == "primary":
- base = basedir if basedir else os.path.dirname(uri)
+ base = basedir if basedir else os.path.dirname(uri_file_path(str(uri)))
elif relative_deps == "cwd":
- base = file_uri(os.getcwd())
+ base = os.getcwd()
else:
raise Exception(u"Unknown relative_deps %s" % relative_deps)
diff --git a/cwltool/pack.py b/cwltool/pack.py
index e2e2e3d..f58091a 100644
--- a/cwltool/pack.py
+++ b/cwltool/pack.py
@@ -3,7 +3,7 @@ import json
from schema_salad.ref_resolver import Loader
-from .process import scandeps, shortname
+from .process import scandeps, shortname, uniquename
from typing import Union, Any, cast, Callable, Dict, Tuple, Type, IO, Text
@@ -12,9 +12,12 @@ def flatten_deps(d, files): # type: (Any, Set[Text]) -> None
for s in d:
flatten_deps(s, files)
elif isinstance(d, dict):
- files.add(d["location"])
+ if d["class"] == "File":
+ files.add(d["location"])
if "secondaryFiles" in d:
flatten_deps(d["secondaryFiles"], files)
+ if "listing" in d:
+ flatten_deps(d["listing"], files)
def find_run(d, runs): # type: (Any, Set[Text]) -> None
if isinstance(d, list):
@@ -56,15 +59,16 @@ def pack(document_loader, processobj, uri, metadata):
for f in fdeps:
find_run(document_loader.idx[f], runs)
+ names = set() # type: Set[Text]
rewrite = {}
if isinstance(processobj, list):
for p in processobj:
- rewrite[p["id"]] = "#" + shortname(p["id"])
+ rewrite[p["id"]] = "#" + uniquename(shortname(p["id"]), names)
else:
rewrite[uri] = "#main"
- for r in runs:
- rewrite[r] = "#" + shortname(r)
+ for r in sorted(runs):
+ rewrite[r] = "#" + uniquename(shortname(r), names)
packed = {"$graph": [], "cwlVersion": metadata["cwlVersion"]
} # type: Dict[Text, Any]
diff --git a/cwltool/process.py b/cwltool/process.py
index 8e4a20d..ca0b195 100644
--- a/cwltool/process.py
+++ b/cwltool/process.py
@@ -610,14 +610,16 @@ def empty_subtree(dirpath): # type: (Text) -> bool
_names = set() # type: Set[Text]
-
-def uniquename(stem): # type: (Text) -> Text
+def uniquename(stem, names=None): # type: (Text, Set[Text]) -> Text
+ global _names
+ if names is None:
+ names = _names
c = 1
u = stem
- while u in _names:
+ while u in names:
c += 1
u = u"%s_%s" % (stem, c)
- _names.add(u)
+ names.add(u)
return u
def nestdir(base, deps):
diff --git a/setup.cfg b/setup.cfg
index d46ef4b..b202cbf 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,7 +5,7 @@ exclude = cwltool/schemas
[easy_install]
[egg_info]
-tag_build = .20170111193653
+tag_build = .20170114120503
tag_date = 0
tag_svn_revision = 0
diff --git a/setup.py b/setup.py
index 2c637ed..a3d6106 100755
--- a/setup.py
+++ b/setup.py
@@ -48,8 +48,7 @@ setup(name='cwltool',
'rdflib >= 4.2.0, < 4.3.0',
'shellescape >= 3.4.1, < 3.5',
'schema-salad >= 2.2.20170111180227, < 3',
- 'typing >= 3.5.2, < 3.6',
- 'cwltest >= 1.0.20161227194859'
+ 'typing >= 3.5.2, < 3.6'
],
test_suite='tests',
tests_require=[],
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/cwltool.git
More information about the debian-med-commit
mailing list