PlatformIO Community

Downloading required python packages automatically

I can’t quite figure this out:

I want to contribute / add support for the TinyFPGA BX board under the Lattice iCE40 board collection. The thing is that the TinyFPGA does not use standard serial to program it (The board does not contain a FTDI chip.) You need to ‘pip install tinyprog’ to install the bit banged programmer.

The rest of the toolchain is fine, and adding the board definition is easy too - I just need to add a step to install tinyprog when you install the iCE platform. How / where is that done?

Symbiotic EDA Team is already contacted us with the same question. I hope they will provide an independent tinyprog with all dependencies soon. A short part of our mailing:

A good workaround is to pack your tool with its dependencies (you can install dependencies in a separate folder by using the next command pip install -t target_dir --no-cache-dir --no-compile) and modify PYTHONPATH environment variable in your build script, something like:
env.PrependENVPath("PYTHONPATH", join(platform.get_pkg_dir("tool-fgpa-uploader", "site-packages"))
where site-packages is the folder where you installed your dependencies.

1 Like