Generic wrapper tool around open source EDA tools that runs Docker containers
Project description
EDA Container Wrapper
EDA container wrapper is a work-in-progress generic wrapper tool around open source EDA tools. The tools are executed in Docker containers and this tool wraps this execution and keeps an inventory of tools.
It supports three use cases:
- Run
eda-container-wrapper
to execute the wrapper with given parameters - Let
eda-container-wrapper
create a wrapper script (in an executable path for example) with pre-defined settings - Run tools from python using the
edacontainerwrapper
module
The settings can be set in the following way in precedence order:
- As parameters to the
eda-container-wrapper
tool or to the respective functions ofedacontainerwrapper
- As environment variables
- As default settings in the wrapper scripts
Installation
$ pip3 install eda-container-wrapper
Supported settings
Tool version (--tool-version
or ECW_TOOL_VERSION
, default: depends on tool)
Sets the version of the tool to use.
Interactive (--non-interactive
or ÈCW_INTERACTIVE
, default: interactive)
Runs the Docker container in interactive mode (allowing to terminate it easily
for example) with the Docker -ti
flags. Some non-interactive environments such
as CI don't support that (missing tty). Note the difference in logic, the
default is interactive mode which is disabled with the --non-interactive
switch. ECW_INTERACTIVE
keeps it interactive when set to true
or 1
and it
will be non-interactive otherwise.
Current work directory base (--cwd-base
or ECW_CWD_BASE
, default: not set)
If not empty this is a colon-separated pair of a leading path of the cwd where
the tool was called from and a replacement for this path. This is in particular
useful when called from inside a Docker container, such as in CI. The syntax is:
<actual path>:<cwd path>
.
Split the current working directory (--split-cwd-tail
or ECW_SPLIT_CWD_TAIL
, default: 0
)
When mapping the current working directory, this setting actually maps the path up the hierarchy by the given value. This is in particular useful when you need to access data relative to the current working directory that is in upper and sibbling folders.
For example, when started from the following folder:
CWD=/path/to/my/project/build
Setting --split-cwd-tail=1
the split is into /path/to/my/project
and
build
. Each tool has a "project path" that is the volume where the tool is
executed in then by setting the working directory. For a tool with the project
path /project
it will then mount /path/to/my/project
to /project
and the
workdir will be /project/build
.
This split is executed after processing the cwd base
.
Running a Tool
As described above there are different ways to run a tool, that are described in the following.
Run eda-container-wrapper
The program is called with the parameters as described and the toolname.
Following a --
parameters to the tool can be supplied.
Example:
$ eda-container-wrapper verilator -- --version
Create wrapper
To create a verilator
script that by default executes version 4.100:
$ eda-container-wrapper --write-script=/usr/local/bin/verilator --tool-version 4.100 verilator
and then execute it:
$ verilator --version
Verilator 4.100 2020-09-07 rev v4.100
Setting the environment setting ECW_TOOL_VERSION
changes the defualt behavior:
$ ECW_TOOL_VERSION=4.102 verilator --version
Verilator 4.102 2020-10-15 rev v4.102
It can be useful to create the script in your virtual environment:
$ eda-container-wrapper --write-script=$VIRTUAL_ENV/verilator --tool-version 4.100 verilator
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file eda-container-wrapper-0.0.4.tar.gz
.
File metadata
- Download URL: eda-container-wrapper-0.0.4.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6209531aa22bb629189de808c32f40521557b5321d7093527c566ed09c9977e |
|
MD5 | 7ea641bf2de2f0e98258f65a23b1565a |
|
BLAKE2b-256 | 62b3a898894d6a5a1d1e6ca96000be9e35c80ae500864030c44370137693dd42 |
File details
Details for the file eda_container_wrapper-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: eda_container_wrapper-0.0.4-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e932f18a91a83ee447477bacc6ee2abd9cf59f857b467d27061424a92f85b73 |
|
MD5 | fd3c94fb2d81a0070ce106ddd3246de2 |
|
BLAKE2b-256 | 17caa4874bc5db7b786eb99f702c41f2b21f41d4b4d274f56fe3d194b2e75dfa |