fix README.md and pype root determination when running from sources

This commit is contained in:
Ondrej Samohel 2021-03-17 16:58:24 +01:00
parent 05f4b77d6b
commit 64fcec4d4a
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
3 changed files with 5 additions and 14 deletions

View file

@ -208,21 +208,10 @@ install it to user data directory (on Windows to `%LOCALAPPDATA%\pypeclub\pype`,
### From sources
Pype can be run directly from sources by activating virtual environment:
**On Windows:**
```powershell
.\venv\Scripts\Activate.ps1
```
and running:
```powershell
python start.py tray
```
**On macOS/Linux:**
```sh
source ./venv/bin/activate
python start.py tray
poetry run python start.py tray
```
This will use current Pype version with sources. You can override this with `--use-version=x.x.x` and
then Pype will try to find locally installed specified version (present in user data directory).

View file

@ -111,6 +111,7 @@ if getattr(sys, 'frozen', False):
paths.append(frozen_libs)
os.environ["PYTHONPATH"] = os.pathsep.join(paths)
import igniter # noqa: E402
from igniter import BootstrapRepos # noqa: E402
from igniter.tools import get_pype_path_from_db # noqa
from igniter.bootstrap_repos import PypeVersion # noqa: E402
@ -469,7 +470,9 @@ def _bootstrap_from_code(use_version):
assert local_version
else:
pype_root = os.path.normpath(
os.path.dirname(os.path.realpath(__file__)))
os.path.dirname(
os.path.dirname(
os.path.realpath(igniter.__file__))))
# get current version of Pype
local_version = bootstrap.get_local_live_version()

View file

@ -1 +0,0 @@
I have run