Skip to content

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.

# 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

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

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
@whitequark
Copy link
Member

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.

2 participants