JeanChristopheMorinPerso / rez-pip

PyPI/python package ingester/converter for the rez package manager
https://rez-pip.readthedocs.io/en/latest/
Apache License 2.0
23 stars 5 forks source link

Plugin system #91

Open JeanChristopheMorinPerso opened 7 months ago

JeanChristopheMorinPerso commented 7 months ago

Draft PR for visibility. It kind of works on Linux.

It adds a new plugin system with multiple hooks. There is an example plugin to add support for correctly installing PySide6>=6.3. The plugin takes care of merging all the PySide6 related packages (PySide6, PySide6-Addons and PySide6-Essentials) into one rez package. There is also a shiboken6 plugin that takes care of removing the vendored PySide6 stuff...

$ rez-pip2 PySide6 --prefix /tmp/asd --python 3.11 -- --find-links /tmp/wheels --no-index

$ rez-env PySide6 --paths ~/rez_packages:/tmp/asd -- python -c 'import PySide6,shiboken6; print(PySide6); print(shiboken6)'
<module 'PySide6' from '/tmp/asd/PySide6/6.6.1/9645a50b415bcaad6bcde791aeb0859a43c56501/python/PySide6/__init__.py'>
<module 'shiboken6' from '/tmp/asd/shiboken6/6.6.1/9645a50b415bcaad6bcde791aeb0859a43c56501/python/shiboken6/__init__.py'>

:tada:

TODOs:

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 67.32283% with 83 lines in your changes are missing coverage. Please review.

Project coverage is 77.46%. Comparing base (f3bd30f) to head (361601a).

Files Patch % Lines
src/rez_pip/plugins/PySide6.py 50.90% 19 Missing and 8 partials :warning:
src/rez_pip/cli.py 26.92% 16 Missing and 3 partials :warning:
src/rez_pip/pip.py 69.69% 9 Missing and 1 partial :warning:
src/rez_pip/plugins/__init__.py 87.27% 5 Missing and 2 partials :warning:
src/rez_pip/plugins/shiboken6.py 58.82% 5 Missing and 2 partials :warning:
src/rez_pip/install.py 50.00% 4 Missing :warning:
src/rez_pip/rez.py 87.50% 1 Missing and 3 partials :warning:
src/rez_pip/utils.py 25.00% 2 Missing and 1 partial :warning:
src/rez_pip/compat.py 75.00% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #91 +/- ## ========================================== - Coverage 81.25% 77.46% -3.79% ========================================== Files 8 12 +4 Lines 720 914 +194 Branches 150 207 +57 ========================================== + Hits 585 708 +123 - Misses 119 173 +54 - Partials 16 33 +17 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.