Cross-platform support #1495

Closed
wants to merge 10 commits into
from

Projects

None yet

2 participants

@Sahloul
Contributor
Sahloul commented Jul 31, 2016 edited

Windows can now run OpenSSH server, however, test is not provided in portable GNU executables.
As per issue #1496, stat would provide a better replacement, especially since it exits in *NIX and Windows GNU portable executables!

Sahloul added some commits Jul 31, 2016
@Sahloul Sahloul Cross-platform support
Windows can now run OpenSSH server, however, test is not provided in portable GNU executables.
"stat" would provide a better replacement, especially since it exits in *NIX and Windows GNU portable executables!
daf993b
@Sahloul Sahloul Expand *NIX paths while supporting windows
Windows does not need path expansion!
9a0abbe
@Sahloul Sahloul Fixup
Handle exception thrown when running 'ver' in Linux
3e7cc74
@Sahloul Sahloul Update files.py 6695422
@bitprophet
Member

@Sahloul notes in #1496 that ver is used here as a sentinel to determine remote platform. I don't know if it's the best way to do this offhand - is it available in all commonly found Windows versions out there? Are there any packages in popular Linux distros that might install a ver binary? etc.

Another random idea is to use the SFTP functionality to test file existence; though this has its own drawbacks (not all SSHDs have SFTP subsystem enabled; not usually possible to leverage sudo superpowers with SFTP; etc.)

Sahloul added some commits Aug 2, 2016
@Sahloul Sahloul WinOS echoes quotes
Fixed expanding paths when remote server is Windows OS
94ea8a9
@Sahloul Sahloul Cleanup e697bf2
@Sahloul
Contributor
Sahloul commented Aug 2, 2016

@bitprophet You are right! Depending on ver was not a good idea after all..
I have proposed a clean workaround for both remote file existence and path expansion compatibility.

Sahloul added some commits Aug 3, 2016
@Sahloul Sahloul Provided changelog
And refactored the code nicely.
82583d2
@Sahloul Sahloul Fixup
docs warnings!
a5bd5e0
@Sahloul Sahloul Update files.py
Inline emphasis fix
66b6f2c
@Sahloul
Contributor
Sahloul commented Aug 5, 2016

@bitprophet Mind to check what are the reasons for the build failure? I cannot understand its messages...

@bitprophet
Member

@Sahloul the error is here: https://travis-ci.org/fabric/fabric/jobs/150021540#L1221 - looks like your docstring just isn't formatted as well as Sphinx wants, you need a code block or inline monospace or something. I can handle it whenever I merge, don't worry about it :) thanks!

@bitprophet bitprophet added this to the 1.10.5 milestone Aug 8, 2016
@Sahloul
Contributor
Sahloul commented Aug 8, 2016

It was just the asterisk in *NIX ;)

@bitprophet bitprophet modified the milestone: 1.13, 1.10.5 Aug 22, 2016
@bitprophet bitprophet added a commit that referenced this pull request Aug 22, 2016
@bitprophet bitprophet Changeog re #1495 6e7c938
@bitprophet
Member
bitprophet commented Aug 22, 2016 edited

Originally cherry-picked this to 1.10 but then changed my mind; Github still isn't noticing though. Meh. It's in, will be released as part of 1.13. thanks!

@bitprophet bitprophet closed this Aug 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment