Package: chamberenv
Manage chamber environmentsThis project is inspired bytfenv.It's supposed to be a helper tool, that easily installs, removes, lists and switches different versions of chamber.It downloads the different versions ofchamberfrom the github release page:https://github.com/segmentio/chamber/releases.It creates the configuration folder:~/.config/chamberenv.It manages the executable files in:~/.local/bin, so make sure this is in yourPATHvariable.Note:This is work in progress.I only tested it withlinux, downloading and runningchamberversions likechamber-v2.8.2-linux-amd64.How toGet help:chamberenv --helpGet the tool version:chamberenv --versionGeneral usage.List managed versions of chamber:chamberenv list
    # Result:
    * v2.8.2 (set by /home/norman/.config/chamberenv/version)
      v2.8.0Install a specific version of chamber:chamberenv install --chamber-version v2.7.5
    # Result:
    INFO:ChamberEnv:Chamber version: v2.7.5
    INFO:ChamberEnv:CHECKSUM OK.
    Downloaded chamber version 'v2.7.5'.
    Using chamber version 'v2.7.5' now.

    chamber version
    # Result:
    chamber v2.7.5The version of chamber will be downloaded if necessary.The given version will be activated as well.Use a specific version of chamber:chamberenv use --chamber-version v2.8.2
    # Result:
    INFO:ChamberEnv:Chamber version: v2.8.2
    Using chamber version 'v2.8.2' now.

    chamber version
    # Result:
    chamber v2.8.2Nothing is downloaded.The given version will be activated.Uninstall a specific version of chamber:chamberenv uninstall --chamber-version v2.7.5
    # Result:
    INFO:ChamberEnv:Chamber version: v2.7.5
    Removed chamber version 'v2.7.5'.The downloaded files for this version of chamber will be removed.You cannot uninstall the active version of chamber:chamber version
    # Result:
    chamber v2.8.2

    chamberenv uninstall --chamber-version v2.7.5
    # Result:
    INFO:ChamberEnv:Chamber version: v2.8.2
    ERROR:ChamberEnv:Not uninstalling the active chamber version. Switch first using 'use'.The only exception to the above rule is when the active version of chamber is the only version installed. This will remove the downloaded files as well as thechamberexectuable.The option--debugshows debug information.See:chamberenv --help.chamberenv install --help...requirements.txt vs. setup.pyAccording to these sources:python documentationstackoverflow - second answer by jonathan HansonI try to stick to:requirements.txtlists the necessary packages to make a deployment work.setup.pydeclares the loosest possible dependency versions.Creatingrequirements.txtYou won't ever need this probably - This is helpful when developing thechamberenv.pip-toolsis used to createrequirements.txt.There isrequirements.inwhere dependencies are set and pinned.To create therequirements.txt, runupdate_requirements.shwhich basically just callspip-compile.Note:There also isbuild_requirements.txtwhich only containspip-tools. I found, when working with virtual environments, it is necessary to installpip-toolsinside the virtual environment as well. Otherwisepip-syncwould install outside the virtual environment.A development environment can be created like this:# Create a virtual environment 'venv'.
    python -m venv venv
    # Activate the virtual environment 'venv'.
    . /venv/bin/activate
    # Install 'pip-tools'.
    pip install --upgrade -r build_requirements.txt
    # Install dependencies.
    pip-sync requirements.txt
    ...
    # Deactivate the virtual environment 'venv'.
    deactivateExecutableIf installed usingpip, a system executable will be installed as well.
This way, you can just use the tool like every executable on your system.chamberenv --help