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

SSH Client Support via Paramiko #461

Merged
merged 6 commits into from Aug 26, 2020
Merged

Conversation

cr1901
Copy link
Contributor

@cr1901 cr1901 commented Jul 31, 2020

Add execute_remote_ssh method to BuildPlan, and RemoteSshBuildProducts class to nmigen.build.run. Also add paramiko to extras_require.

nmigen/build/run.py Outdated Show resolved Hide resolved
nmigen/build/run.py Outdated Show resolved Hide resolved
nmigen/build/run.py Outdated Show resolved Hide resolved
nmigen/build/run.py Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
nmigen/build/run.py Outdated Show resolved Hide resolved
nmigen/build/run.py Outdated Show resolved Hide resolved
nmigen/build/run.py Show resolved Hide resolved
nmigen/build/run.py Outdated Show resolved Hide resolved
nmigen/build/run.py Show resolved Hide resolved
# Forbid parent directory components completely to avoid the possibility
# of writing outside the build root. We can't use normpath to remove ".."
# because we may be running on Windows, but the remote is a *nix machine.
assert ".." not in filename.parts
Copy link
Member

@whitequark whitequark Aug 25, 2020

Choose a reason for hiding this comment

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

Instead of explaining why we don't use normpath here, let's just drop it in local builds as well. This way we don't have to explain anything, and the next person who copies the code for local builds doesn't introduce a similar bug, either.

Copy link
Contributor Author

@cr1901 cr1901 Aug 26, 2020

Choose a reason for hiding this comment

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

Fixed. os.path functions accepting Pathlib objects works down to and include Python 3.6, which is our cutoff. So might as well use it.

@whitequark whitequark merged commit ef7a3bc into amaranth-lang:master Aug 26, 2020
5 checks passed
@whitequark
Copy link
Member

@whitequark whitequark commented Aug 26, 2020

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants