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

BuildProducts.extract() doesnt work for files in subdirectories #353

Closed
anuejn opened this issue Apr 12, 2020 · 0 comments
Closed

BuildProducts.extract() doesnt work for files in subdirectories #353

anuejn opened this issue Apr 12, 2020 · 0 comments
Labels
Milestone

Comments

@anuejn
Copy link
Contributor

anuejn commented Apr 12, 2020

MVCE:

from nmigen import *
from nmigen_boards.icebreaker import ICEBreakerPlatform


class Top(Elaboratable):
    def elaborate(self, plat):
        plat.add_file("somedir/somefile.txt", "some file content")
        return Module()


if __name__ == "__main__":
    platform = ICEBreakerPlatform()
    products = platform.build(Top(), do_build=True)
    with products.extract("somedir/somefile.txt") as filename:
        print(filename)

results in FileNotFoundError: [Errno 2] No such file or directory: '/tmp/nmigen_6wxdgqug_somedir/somefile.txt'

@anuejn anuejn changed the title BuildProducts extract doesnt work for files in subdirectories BuildProducts.extract() doesnt work for files in subdirectories Apr 12, 2020
@whitequark whitequark added the bug label Apr 12, 2020
@whitequark whitequark added this to the 0.3 milestone Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants