-
Notifications
You must be signed in to change notification settings - Fork 5
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
Plugin system #91
base: main
Are you sure you want to change the base?
Plugin system #91
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.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 ☔ View full report in Codecov by Sentry. |
178c63c
to
f9b6577
Compare
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
f9b6577
to
e57ce92
Compare
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
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.
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?
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 vendoredPySide6
stuff...🎉
TODOs: