Skip to content
Snippets Groups Projects
build.sh 988 B
Newer Older
  • Learn to ignore specific revisions
  • thomaswoehlke's avatar
    thomaswoehlke committed
    #!/usr/bin/env bash
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    function setup_venv() {
        deactivate
        rm -rf venv
        py -3 -m venv venv
        venv/Scripts/activate
    }
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    function pip_compile() {
      pip-compile -r requirements/build.in
      pip-compile -r requirements/docs.in
      pip-compile -r requirements/tests.in
      pip-compile -r requirements/dev.in
      . scripts/script_get_python_requirements_from_txt.sh
    }
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    function pip_install() {
      pip install -r requirements/build.in  --log logfile1.txt
      pip install -r requirements/docs.in  --log logfile2.txt
      pip install -r requirements/tests.in --log logfile3.txt
      pip install -r requirements/dev.in --log logfile4.txt
    }
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    function pip_install_via_setup_py() {
      # pip install -e . --compile --force-reinstall --progress-bar pretty --log logfile5.txt
      pip install -e . --compile --progress-bar pretty --log logfile5.txt
    }
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    function build_wheel() {
      python -m build --wheel
    }
    
    function main() {
      #setup_venv
      pip_compile
      pip_install
      pip_install_via_setup_py
      #build_wheel
    }
    
    main