-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add plugin system #91
base: main
Are you sure you want to change the base?
Conversation
@@ -113,8 +136,8 @@ def make_root(variant: rez.packages.Variant, path: str) -> None: | |||
pkg.pip = { | |||
"name": dist.name, | |||
"version": dist.version, | |||
"is_pure_python": metadata["is_pure_python"], | |||
"wheel_url": wheelURL, | |||
"is_pure_python": isPure, |
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.
This annoys me. I don't think we really need this...
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.
What is annoying about it?
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.
It's kind of useless and getting the value of "is pure" is annoying. Do you think I should keep it?
5163f94
to
c7edc67
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #91 +/- ##
==========================================
- Coverage 81.14% 77.54% -3.61%
==========================================
Files 8 12 +4
Lines 716 935 +219
Branches 133 180 +47
==========================================
+ Hits 581 725 +144
- Misses 121 177 +56
- Partials 14 33 +19 ☔ View full report in Codecov by Sentry. |
178c63c
to
f9b6577
Compare
f9b6577
to
e57ce92
Compare
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.
Left a couple questions/comments.
"rez": ("https://rez.readthedocs.io/en/stable/", None), | ||
} | ||
|
||
# Force usage of :external: | ||
intersphinx_disabled_reftypes = ["*"] | ||
# intersphinx_disabled_reftypes = ["*"] |
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.
Is this something we are wanting to keep commented out or remove?
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 don't remember the exact reason I did this, but I remember that it was causing issues. I'll probably have to investigate this more to remember why I changed that.
======= | ||
Plugins | ||
======= | ||
|
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.
Could use a small writeup of what plugins are in rez-pip
and how they work at the top here.
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.
Indeed. I'll write something up once I'm fully happy with the plugin system.
src/rez_pip/pip.py
Outdated
self.__localPath = path | ||
|
||
|
||
class PackageGroup: |
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.
What functionality does this new class provide?
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.
It's mainly a convenience that saves me from having to use zip
in multiple places. A package groups contains the grouped packages and also has their distribution objects. It's also slightly easier to work with a list of PackageGroup than a list of list. I first implemented the code without this class, and the result was 🍝.
|
||
On Windows, the PySide6/openssl folder has to be added to PATH, see https://inspector.pypi.io/project/pyside6/6.6.1/packages/ec/3d/1da1b88d74cb5318466156bac91f17ad4272c6c83a973e107ad9a9085009/PySide6-6.6.1-cp38-abi3-win_amd64.whl/PySide6/__init__.py#line.81. | ||
|
||
So it's at least a 3 steps process: |
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.
Note that you only listed 2 steps here 😆
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.
This is outdated I think
if typing.TYPE_CHECKING: | ||
from rez_pip.compat import importlib_metadata | ||
|
||
# PySide6 was initiall a single package that had shiboken as a dependency. |
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.
Couple of typos in these comments.
packages: typing.List[str], | ||
) -> None: | ||
pyside6Seen = False | ||
variantsSeens = [] |
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.
Should this just be variantsSeen
?
@@ -113,8 +136,8 @@ def make_root(variant: rez.packages.Variant, path: str) -> None: | |||
pkg.pip = { | |||
"name": dist.name, | |||
"version": dist.version, | |||
"is_pure_python": metadata["is_pure_python"], | |||
"wheel_url": wheelURL, | |||
"is_pure_python": isPure, |
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.
What is annoying about it?
cd5f530
to
27b6a5c
Compare
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
…e arguments are immutable The code is also a little bit cleaner IMO Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
…force immutability at runtime. Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
… positional arguments instead of kwargs Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
9fd066c
to
d39e1d7
Compare
Fixes #64.
Add a new generic plugins system and builtin plugins. The glugin system is based on pluggy and has 5 hooks:
prePipResolve
,postPipResolve
,groupPackages
,cleanup
andmetadata
.The 2 builtin plugins are the PySide6 and shiboken6 plugins for correctly installing PySide6>=6.3. The plugins take care of merging all the PySide6 related packages (PySide6, PySide6-Addons and PySide6-Essentials) into one rez package.
🎉
TODOs: