Skip to content

Commit

Permalink
Refactored for 2.47.3
Browse files Browse the repository at this point in the history
  • Loading branch information
j0yu committed Sep 28, 2019
1 parent f66c239 commit 1ad335a
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 7 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/wiki-doctest-installation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# JUST AN EXPERIMENT - delete/replace as necessary before merge
name: Wiki - doctest Installation
on: [push]

jobs:
linux:
name: Debian (Python) - install
runs-on: ubuntu-latest
container: python:${{ matrix.python-version }}
strategy:
matrix:
python-version: ['2.7', '3.7']

steps:
- name: Checkout
uses: actions/checkout@master

- name: Default python install.py
run: |
python install.py
test -d /opt/rez/bin/rez
test -d /opt/rez/completion
- name: pip install --target
run: |
pip install --ignore-installed --force-reinstall --target target .
cd target
echo
echo "==========================================="
echo "Installed into (pwd, maxdepth 2):"
pwd
echo "==========================================="
find . -maxdepth 2 ! -name '*.pyc' -ls
- name: pip install --prefix
run: |
pip install --ignore-installed --force-reinstall --prefix prefix .
cd prefix
echo
echo "==========================================="
echo "Installed into (pwd, maxdepth 5):"
pwd
echo "==========================================="
find . -maxdepth 5 ! -name '*.pyc' -ls
- name: rez-pip --install
run: |
python install.py
export PATH=${PATH}:/opt/rez/bin/rez
echo "==========================================="
rez-pip --install .
echo "==========================================="
rez view rez
cd $(find $HOME/packages/rez -maxdepth 2 -type d | tail -1)
echo
echo "==========================================="
echo "Installed as rez package (pwd, maxdepth 3):"
pwd
echo "==========================================="
find -maxdepth 3 ! -name '*.pyc' -ls
2 changes: 1 addition & 1 deletion src/rez/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from rez.vendor.distlib.markers import interpret
from rez.vendor.distlib.util import parse_name_and_version
from rez.vendor.enum.enum import Enum
from rez.vendor.six.six.moves import StringIO
from rez.resolved_context import ResolvedContext
from rez.utils.system import popen
from rez.utils.pip import get_rez_requirements, pip_to_rez_package_name, \
Expand All @@ -19,7 +20,6 @@
from rez.system import System

from tempfile import mkdtemp
from StringIO import StringIO
from pipes import quote
from pprint import pformat
import subprocess
Expand Down
2 changes: 1 addition & 1 deletion src/rez/plugin_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def load_plugins(self):
self.failed_plugins[nameish] = str(e)
if config.debug("plugins"):
import traceback
from StringIO import StringIO
from rez.vendor.six.six.moves import StringIO
out = StringIO()
traceback.print_exc(file=out)
print_debug(out.getvalue())
Expand Down
4 changes: 2 additions & 2 deletions src/rezgui/dialogs/ResolveDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from rezgui.objects.ResolveThread import ResolveThread
from rezgui.objects.App import app
from rez.vendor.version.requirement import Requirement
from rez.vendor.six.six.moves import StringIO
from rez.config import config
import StringIO


class ResolveDialog(QtGui.QDialog, StoreSizeMixin):
Expand Down Expand Up @@ -274,7 +274,7 @@ def _resolve_finished(self):

if self.resolver.success():
if self.advanced:
sbuf = StringIO.StringIO()
sbuf = StringIO()
self.resolver.context.print_info(buf=sbuf)
msg = "\nTHE RESOLVE SUCCEEDED:\n\n"
msg += sbuf.getvalue()
Expand Down
12 changes: 9 additions & 3 deletions wiki/pages/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,19 @@ source /opt/rez/completion/complete.sh

## Installation Via Pip

It is possible to install rez with pip, like so:
It is possible to install rez with pip, like so (from source root directory):

```
]$ pip install rez
]$ pip install --target /opt .
```

However, this comes with a caveat - rez command line tools _are not guaranteed
If you already have `rez` setup, you could also try:

```
]$ rez-pip --install .
```

However, these comes with a caveat - rez command line tools _are not guaranteed
to work correctly_ once inside a rez environment (ie after using the `rez-env`
command). The reasons are given in the next section.

Expand Down

0 comments on commit 1ad335a

Please sign in to comment.