Skip to content

setupEnv

Konychev Valera edited this page Dec 20, 2022 · 6 revisions

Description

setupEnv - light and crossplatform tool for setting envinronment.

How to run

python setupEnv

Add new instance for setup

To adding new instance for setup just add name of it to the deps.txt file, using YAML format

tools:
    - myTool0
    - myTool1

libs:
    - myLib0
    - myLib1

Tools should be specified after tools: special word and libs should be specified after libs:. tools: and libs: first of all mean directories where installation scripts are. Tools and libs can be written in every order.

Example: myTool0 depends on myTool1

tools:
    - myTool0:
        myTool1
    - myTool1

Example: adding dependence myTool1 on myLib0 and myLib1

tools:
    - myTool0:
        myTool1
    - myTool1:
        - myLib0
        - myLib1

libs:
    - myLib0
    - myLib1

Example: adding version, install directory and dependencies for myLib1:

tools:
    - myTool0:
        myTool1
    - myTool1:
        - myLib0
        - myLib1

libs:
    - myLib0
    - myLib1:
        ver: 1.0
        dir: ./../
        deps:
            myLib0

Every instance can have none, one, two or all of ver, dir, deps parameters. Directories can be in different kid. First of all it can be an absolute path. Secondly, directory can be write as a relative path. In this case ROOT of path is a directory contains main deps.txt file.

Also every of them can be specified for a different operation systems by linux, mac or win param.

Example: specify different install directories for myLib1 depends on OS:

tools:
    - myTool0:
        myTool1
    - myTool1:
        - myLib0
        - myLib1

libs:
    - myLib0
    - myLib1:
        ver: 1.0
        dir: 
            linux: ~/.local/
            win: C:\
        deps:
            myLib0

Add new installation scripts for setup

setupEnv contains some scripts for crossplatform installation different tools and libs, whey can be found in corresponding directories.

If you want to add new one just create new directory in tools/ or libs/ with the name of instance, put install.py script and add you instance to the deps.txt file.

setupEnv Arguments:

-f, --deps-file Path to file contains high-level setup instances and dependencies. Default: deps.txt