Merge branch 'py23' of github.com:smurfix/OctoPrint into pr/3032
This commit is contained in:
commit
f8e7ae7436
1 file changed
+9
-13
@@ -20,21 +20,19 @@ below.
|
||||
* Checkout the OctoPrint sources from their Git repository:
|
||||
* ``git clone -b devel https://github.com/foosel/OctoPrint.git``
|
||||
* Enter the checked out source folder: ``cd OctoPrint``
|
||||
* Create a virtual environments in the checked out source folder for both Python 2.7 and Python 3.7 to use for
|
||||
* Create virtual environments in the checked out source folder for both Python 2.7 and Python 3.7 to use for
|
||||
installing and running OctoPrint and its dependencies (this avoids potential versioning issues for the dependencies
|
||||
with system wide installed instances):
|
||||
* PY2: ``virtualenv --python=python2 venv2``
|
||||
* PY3: ``virtualenv --python=python3 venv3``
|
||||
* Activate a virtual environments:
|
||||
* PY2 : ``source venv2/bin/activate`` (Linux, MacOS) or ``source venv2/Scripts/activate`` (Git Bash under Windows, see below)
|
||||
* PY3 : ``source venv3/bin/activate`` (Linux, MacOS) or ``source venv3/Scripts/activate`` (Git Bash under Windows, see below)
|
||||
* Update ``pip`` in the virtual environment:
|
||||
* PY2: ``pip2 install --upgrade pip``
|
||||
* PY3: ``pip3 install --upgrade pip``
|
||||
* Activate one of the virtual environment:
|
||||
* PY2: ``source venv2/bin/activate`` (Linux, MacOS) or ``source venv2/Scripts/activate`` (Git Bash under Windows, see below)
|
||||
* PY3: ``source venv3/bin/activate`` (Linux, MacOS) or ``source venv3/Scripts/activate`` (Git Bash under Windows, see below)
|
||||
* Update ``pip`` in the virtual environment:
|
||||
* ``pip install --upgrade pip``
|
||||
* Install OctoPrint in `"editable" mode <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>`_,
|
||||
including its regular *and* development and plugin development dependencies:
|
||||
* PY2: ``pip2 install -e .[develop,plugins]``
|
||||
* PY3: ``pip3 install -e .[develop,plugins]``
|
||||
* ``pip install -e .[develop,plugins]``
|
||||
|
||||
When the virtual environment is activated you can then:
|
||||
|
||||
@@ -42,11 +40,9 @@ When the virtual environment is activated you can then:
|
||||
* run the test suite from the checked out source folder via ``nosetests --with-doctest``
|
||||
* build the documentation from the ``docs`` sub folder of the checked out sources via ``sphinx-build -b html . _build``
|
||||
|
||||
To switch the activated virtual environment, first deactivate the currently selected one:
|
||||
To switch the activated virtual environment, simply activate the new environment as described above.
|
||||
|
||||
* ``deactivate``
|
||||
|
||||
and then activate the other one as described above.
|
||||
To deactivate the virtual environment and return to the system's default Python: ``deactivate``.
|
||||
|
||||
.. _sec-development-environment-source-linux:
|
||||
|
||||
|
||||
Reference in new issue
Block a user