-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue 826 - correct python and pip fallback #878
Changes from 13 commits
2219ec2
249255e
622a14d
7860662
ff7c608
304253b
e5a2ef3
6b30a49
72f6a00
b36ca00
eddb4f2
30a04db
7faaa4b
6e781a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Installation | ||
on: [push] | ||
|
||
jobs: | ||
linux-vm: | ||
name: ${{ matrix.python-version }} - ${{ matrix.method }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: | ||
- '2.7' | ||
- '3.6' | ||
- '3.7' | ||
method: | ||
- 'python ./install.py' | ||
- 'pip install --target /opt/rez .' | ||
include: | ||
- method: 'python ./install.py' | ||
exports: 'PATH=${PATH}:/opt/rez/bin/rez' | ||
- method: 'pip install --target /opt/rez .' | ||
exports: 'PATH=${PATH}:/opt/rez/bin PYTHONPATH=${PYTHONPATH}:/opt/rez' | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install | ||
run: | | ||
${{ matrix.method }} | ||
find /opt/rez/ -maxdepth 2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm tempted to suggest to use check-manifest to test that pip would install the correct files. Though, we would probably have to work a little bit on the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, sounds like a good idea. Let's get a new PR/issue opened for that |
||
|
||
- name: rez status | ||
run: | | ||
export ${{ matrix.exports }} | ||
rez status | ||
|
||
- name: rez-pip --install . | ||
run: | | ||
export ${{ matrix.exports }} | ||
rez-pip --install . | ||
rez view rez | ||
|
||
- name: Import rez package in Python | ||
run: | | ||
export ${{ matrix.exports }} | ||
|
||
# Still needed as there's no fallback to use system's python | ||
rez bind python | ||
|
||
echo "Checking rez as python package: ===========================================" | ||
rez env rez -- python -c 'import rez;print(rez.__file__)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We technically already test this type of install quite a lot for all platforms and all python versions. I think it would make sense to test this here, but only if we test
install.py
more in depth, like make sure it installs the rez scripts in therez
folder correctly, and on all platforms. We should also test https://github.com/nerdvegas/rez/blob/master/install.py#L81.Without testing these things, I have the feeling we will just have jobs that will take CPU time without much benefits.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with testing
python -E
, let's do those in a separate PRs.Does
rez-selftest
checkpython ./install.py
? The other CI tests checks viapython ./install.py ./build
where as I wanted this to actually check the wiki'spython ./install.py
Originally these tests were written just to double check what is said in the Installation Wiki page actually holds true and is not misleading beginners.
So far, this is just a start and we can expand on it to more in-depth and multi-platform tests in the future to ensure whenever someone discovers this project and tries to follow the wiki step by step, it should just work.