File: Vagrantfile

package info (click to toggle)
python-blackboxprotobuf 1.4.2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 696 kB
  • sloc: python: 5,576; makefile: 34; sh: 16
file content (27 lines) | stat: -rw-r--r-- 1,012 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "bento/ubuntu-22.04"

  config.vm.synced_folder "./", "/vagrant", disabled: true

  config.vm.synced_folder "./", "/home/vagrant/blackboxprotobuf", type: "rsync"
  #config.vm.synced_folder "./", "/home/vagrant/blackboxprotobuf"
  config.vm.provision "shell", inline: <<-SHELL
    echo "export PATH=/home/vagrant/.local/bin/:$PATH" >> /home/vagrant/.bashrc
    sudo apt-get update
    sudo apt-get install -y protobuf-compiler jython python3-pip python2
    wget https://bootstrap.pypa.io/pip/2.7/get-pip.py -O /tmp/get-pip2.py
    python2 /tmp/get-pip2.py
    python3 -m pip install poetry
    python2 -m pip install virtualenv
  SHELL

  config.vm.provision "shell", privileged: false, inline: <<-SHELL
    cd blackboxprotobuf/lib
    #poetry env use python2 && poetry install --no-root
    poetry env use python3 && poetry install --no-root
    poetry env use python3 && poetry run mypy --install-types
  SHELL
end