Browse Source

update Vagrantfile

[ci skip]
pull/129/head
Rossen Georgiev 8 years ago
parent
commit
b6ddc6cf17
  1. 41
      README.rst
  2. 17
      Vagrantfile

41
README.rst

@ -25,32 +25,55 @@ Quick install
For details on require system packages, see `Full Installation <http://steam.readthedocs.io/en/latest/install.html>`_.
Install latest version from PYPI::
Install latest version from PYPI
.. code:: bash
pip install -U steam
Install the current dev version from ``github``::
Install the current dev version from ``github``
pip install git+https://github.com/ValvePython/steam
.. code:: bash
pip install git+https://github.com/ValvePython/steam
Testing
Vagrant
-------
To run the test suite with the current ``python``, use::
The repo includes a `Vagrantfile` to setup enviroment for expermentation and development.
We assume you've already have ``vagrant`` and ``virtualbox`` set up.
The VM is ``Ubuntu 16.04`` with all necessary packages installed, and virtualenv for ``python2`` and ``python3``.
.. code:: bash
vagrant up # spin the VM and let it setup
vagrant ssh
# for python2
$ source venv2/bin/activate
# for python3
$ source venv3/bin/activate
Local Testing
-------------
To run the test suite with the current ``python``, use
.. code:: bash
make test
To run for specific version, setup a ``virtual environment``::
To run for specific version, setup a virtual environment
.. code:: bash
virtualenv -p python3 py3
source py3/bin/active
pip install -r requirements.txt
make test
To run for ``python 2.7`` and ``3.4`` assuming you have them installed::
tox
.. _Steam: https://store.steampowered.com/

17
Vagrantfile

@ -10,13 +10,24 @@ Vagrant.configure("2") do |config|
box.vm.host_name = 'ubuntu.local'
box.vm.network "private_network", ip: "192.168.50.10"
box.vm.synced_folder ".", "/srv/steam"
box.vm.synced_folder "../dota2-python", "/srv/dota2"
box.vm.synced_folder "../csgo-python", "/srv/csgo"
box.vm.synced_folder "./steam", "/home/vagrant/steam"
# box.vm.synced_folder "../dota2-python/dota2/", "/home/vagrant/dota2"
# box.vm.synced_folder "../csgo-python/csgo/", "/home/vagrant/csgo"
box.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get -y install build-essential libssl-dev libffi-dev python-dev
apt-get -y install python-pip python-virtualenv
SHELL
box.vm.provision "shell", privileged: false, inline: <<-SHELL
virtualenv -p python2 venv2
source venv2/bin/activate
pip install -r /vagrant/requirements.txt ipython
deactivate
virtualenv -p python3 venv3
source venv3/bin/activate
pip install -r /vagrant/requirements.txt ipython
SHELL
end
end

Loading…
Cancel
Save