Skip to content
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

Add support for Windows #44

Merged
merged 2 commits into from
Nov 24, 2017
Merged

Add support for Windows #44

merged 2 commits into from
Nov 24, 2017

Conversation

blink1073
Copy link
Contributor

@blink1073 blink1073 commented Nov 18, 2017

Relies on andfoy/pywinpty#67 and a release.

Note this is for Python 3 only because pywinpty does not support Python 2.

Here's a screenshot with export SHELL=`which cmd`:

cmd_term

Here it is with export SHELL=`which bash`:

bash_term

Passing build on https://ci.appveyor.com/project/blink1073/terminado/build/1.0.7

I can take care of any Windows related maintenance issues moving forward.

@blink1073
Copy link
Contributor Author

cc @andfoy @jasongrout

@@ -155,23 +167,36 @@ def new_terminal(self, **kwargs):
argv = options['shell_command']
env = self.make_term_env(**options)
pty = PtyProcessUnicode.spawn(argv, env=env, cwd=options.get('cwd', None))
if os.name == 'nt':
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will go away pending a new release of pywinpty

@blink1073
Copy link
Contributor Author

cc @ellisonbg

@blink1073 blink1073 changed the title Add support for Windows [WIP] Add support for Windows Nov 20, 2017
pyproject.toml Outdated
@@ -9,7 +9,8 @@ author-email = "[email protected]"
home-page = "https://github.com/takluyver/terminado"
description-file = "README.rst"
requires = [
"ptyprocess",
"ptyprocess;os_name==posix",
"pywinpty;os_name==nt,python_version>='3.0'",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think posix and nt need to be in quotes - see https://www.python.org/dev/peps/pep-0345/#environment-markers

pyproject.toml Outdated
"ptyprocess;os_name==posix",
"pywinpty;os_name==nt,python_version>='3.0'",
"ptyprocess;os_name=='posix'",
"pywinpty;os_name=='nt',python_version>='3.5'",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'm just looking through the spec, and I think the way to combine expressions is with and, rather than comma. I've opened an issue on flit to validate these markers at build time. pypa/flit#152

@blink1073
Copy link
Contributor Author

@takluyver, we have all of our dependencies, can you please set up appveyor for this repo?

@blink1073 blink1073 changed the title [WIP] Add support for Windows Add support for Windows Nov 20, 2017
@blink1073
Copy link
Contributor Author

Actually, only the win32 wheels are published so far.

@blink1073
Copy link
Contributor Author

I just saw the mailing list post, cancel my request for appveyor here ;).

@andfoy
Copy link
Member

andfoy commented Nov 20, 2017

@blink1073 I'm having some queueing problems with AppVeyor, The wheels for 0.4.1 should be published tomorrow (Central Europe Time) or during the night on America

@blink1073
Copy link
Contributor Author

Great, thanks!

@blink1073
Copy link
Contributor Author

@blink1073
Copy link
Contributor Author

@andfoy would you mind restarting the build? Feodor from Appveyor says it should be good to go.

@andfoy
Copy link
Member

andfoy commented Nov 23, 2017

@blink1073 I've just retried without any success, I've already posted a response on the ticket.

@andfoy
Copy link
Member

andfoy commented Nov 23, 2017

@blink1073 Success! I'll make the release then

Update appveyor

docs

fix test

turn build off

Add pytest dep

Set the path

specify python 3 only for windows

syntax

clean up requirements

Remove unused import

Fix handling of eof and unique term manager

eof is already raised

Clean up terminate and client_disconnected

Use forthcoming API

Remove unused imports

specify the signals for terminate

cleanup

specificy pywinpty version

Fix version specifiers

update specs

Update dependency
@blink1073
Copy link
Contributor Author

@takluyver, ready when you are!

@takluyver takluyver merged commit f13ac98 into jupyter:master Nov 24, 2017
@takluyver
Copy link
Member

Thanks both!

@blink1073 do you want upload permissions on PyPI? If so, what's your PyPI username? With flit installed, it should be just a case of running flit publish .

@blink1073
Copy link
Contributor Author

blink1073 commented Nov 24, 2017 via email

@takluyver
Copy link
Member

Done :-)

@blink1073
Copy link
Contributor Author

Success! https://pypi.python.org/pypi/terminado/0.8, https://github.com/jupyter/terminado/releases/tag/0.8

@blink1073
Copy link
Contributor Author

Verified in a fresh conda env in JupyterLab:

screen shot 2017-11-26 at 8 22 03 pm

@dhirschfeld
Copy link

Just noticed the Home Page on pypi is still pointing to @takluyver's repo:

image

It might be an idea to change that so support questions got to the right place.

@blink1073
Copy link
Contributor Author

Good catch! See #47.

@blink1073 blink1073 deleted the winpty branch November 27, 2017 02:32
@dhirschfeld
Copy link

I also opened #46 in case it's useful! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants