diff --git a/examples/.python b/examples/.python index 6e3e747a..b8a4329c 100755 --- a/examples/.python +++ b/examples/.python @@ -1,8 +1,8 @@ #!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -if [[ ! -e $DIR/.lifx ]]; then - echo "Please run ./setup_venv first" +if [[ ! -e $DIR/../.venv ]]; then + echo "Please run 'source ../dev activate' first" exit 1 fi @@ -10,4 +10,4 @@ if [[ -z $LIFX_CONFIG ]]; then export LIFX_CONFIG=$DIR/lifx.yml fi -exec $DIR/.lifx/bin/python "$@" +exec "$DIR/../.venv/bin/python" "$@" diff --git a/examples/README.rst b/examples/README.rst index 2eed8207..4f746fe8 100644 --- a/examples/README.rst +++ b/examples/README.rst @@ -1,7 +1,7 @@ Examples ======== -To run these scripts first run ``./setup_venv`` +To run these scripts first run ``source ../dev activate`` Then just run the scripts. @@ -9,7 +9,7 @@ For example, to cycle a rainbow over your lights:: $ ./cycle_rainbow.py -Unless you're on windows, in which case ``./setup_venv`` won't work. On windows +Unless you're on windows, in which case ``source ../dev activate`` won't work. On windows make you're own virtualenv and ``pip install photons-core`` in it, or ``pip install -e .`` from the ``photons-core`` directory and then run the scripts with ``python``. i.e. ``python find``. diff --git a/examples/setup_venv b/examples/setup_venv deleted file mode 100755 index f495ed4c..00000000 --- a/examples/setup_venv +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python3 - -import runpy -from pathlib import Path - -tools_folder = Path(__file__).parent.parent / "tools" -manager = runpy.run_path(str(tools_folder / "bootstrap_venvstarter.py"))["manager"] - -manager = manager("lifx") -manager.add_local_dep( - "{here}", - "..", - "modules", - version_file=( - "photons_app", - "__init__.py", - ), - name="lifx-photons-core=={version}", -) -manager.min_python("3.7") -manager.run()