Skip to content
Snippets Groups Projects
build.sh 1.03 KiB
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() {
    
    thomaswoehlke's avatar
    thomaswoehlke committed
        conda deactivate
    
    thomaswoehlke's avatar
    thomaswoehlke committed
        deactivate
        rm -rf venv
    
    thomaswoehlke's avatar
    thomaswoehlke committed
        python -m venv venv
        venv/bin/activate
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    }
    
    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
      pip check
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    }
    
    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
      pip check
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    }
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    function pip_install_via_setup_py() {
    
    thomaswoehlke's avatar
    thomaswoehlke committed
      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
      pip check
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    }
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    function build_wheel() {
    
    thomaswoehlke's avatar
    thomaswoehlke committed
      #python -m build --wheel
      pip check
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    }
    
    function main() {
    
    thomaswoehlke's avatar
    thomaswoehlke committed
      # setup_venv
    
    thomaswoehlke's avatar
    thomaswoehlke committed
      pip_compile
      pip_install
      pip_install_via_setup_py
    
    thomaswoehlke's avatar
    thomaswoehlke committed
      build_wheel
    
    thomaswoehlke's avatar
    thomaswoehlke committed
    }
    
    main