-
-
Notifications
You must be signed in to change notification settings - Fork 232
Windows Compatibility: ensuring Cwltool works on windows OS #419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows Compatibility: ensuring Cwltool works on windows OS #419
Conversation
This reverts commit b5882c5.
Hi, I am working on windows compatibility for cwltool. I am getting file not found error in TestFactory's |
appveyor.yml
Outdated
|
||
|
||
test_script: | ||
- "%CMD_IN_ENV% python setup.py test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can add a command before calling setup.py test
to install requirements from pip
.
Rather than modifying setup.py
, replace schema_salad
in requirements.txt
to
https://github.com/kapilkd13/schema_salad/archive/windows#egg=schema_salad-2.4.20170612171942
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will be enough. you can remove dependency_link
from setup.py
if you use this approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently its just for testing, until schema-salad PR get merged. Its working fine right now but if any problem occur I will go this way. I liked the idea of tweaking requirements.txt rather than setup file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I feel the same. to just specify the version in setup.py
😄
StepInputExpressionRequirement and ScatterFeatureRequirement do not depend on symlinks or any unix features. They are internal operations on the workflow graph. InplaceUpdate is an extension and doesn't need to be supported on Windows. |
Thanks @tetron It helped 👍 Now we are passing all tests on appveyor. 😺 |
3f2eaa1
to
c63c4dd
Compare
Hi @manu-chroma As you are working on python3 compatibiltiy, I think you can help me with this https://travis-ci.org/common-workflow-language/cwltool/jobs/243363735 travis failing test. It is saying |
@kapilkd13 It's the python 3 builds which are failing. The try:
import queue #python3
except ImportError:
import Queue as queue |
@kapilkd13, since you're using Queues with threads, I think it's better to use #419 (comment) rather than multiprocessing Queues. You might find this useful: https://stackoverflow.com/a/925241/1180321 |
Okay. I would do that. Thanks for help help 😄 |
Thanks @manu-chroma 👍 |
@mr-c Would it make sense to do a release now that Python 3 is supported before merging this one? |
cwltool/job.py
Outdated
runtime.append(u"--user=%s" % (euid)) | ||
|
||
if rm_container: | ||
runtime.append(u"--rm") | ||
|
||
runtime.append(u"--env=TMPDIR=/tmp") | ||
runtime.append(u"--env=TMPDIR=%s" % self.builder.tmpdir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, the tmpdir inside the docker container shouldn't change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. I thought we hardcoded tmp by mistake. I will undo it.
cwltool/job.py
Outdated
@@ -436,7 +450,7 @@ def _job_popen( | |||
|
|||
sp = subprocess.Popen(commands, | |||
shell=False, | |||
close_fds=True, | |||
close_fds=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a big change :-) How about close_fds=not onWindows(),
?
Hey @kapilkd13 From the list below, what versions of Windows + docker have been tested?
|
@mr-c Windows 10+native docker for windows and Windows 8.1+ docker toolbox have been tested. I won't be fully sure, but as it works with Docker Toolbox, I would say it should also support Win 8 and win 7. |
@manu-chroma I'm making a separate release first, yep :-) See #472 |
@mr-c I think we are ready to go. That container issue is resolved. I removed additional code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise this looks great!
tests/util.py
Outdated
@@ -15,3 +17,8 @@ def get_data(filename): | |||
if not filepath or not os.path.isfile(filepath): | |||
filepath = os.path.join(os.path.dirname(__file__), os.pardir, filename) | |||
return filepath | |||
|
|||
# Check if we are on windows OS | |||
def onWindows(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use the version in utils.py
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean windows platform version for win 8 and 10. something like sys.platform==win32 etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right 😄 I thought we put all test utilities in util file inside test folder. Earlier i was using this only. i will switch.
This is the main branch for windows compatible cwltool.