-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
Simplify import in python plugins #1471
Comments
installed using pip.
which one?
this sounds as if a venv would be something bad.
well we could have a button to pip install upgrade, but you could also nuke the site dir. iirc when installing another dependency the packages are updated. if not being stuck is not that much of a problem if everything works well right?
thats nothing i want the user to be able to choose. simply because it will double the issues i will get. i prefer to use whatever faclitates distribution of OOTB working plugins.
i have to know the problem with the current one first
runtime dependendies and lib dependencies are different. the former are executables, the latter python packages.
Metadata is missing? I dont get it. |
Many thanks for the reply, and sorry about my inaccurate terminology and wrong understandings. I am not a python programmer. I am writing in python only because I very much like albert and I wish to write some of my own plugins😃. Perhaps I can explain by sharing my situation? I have a plug-in that includes the following code
In 0.26.6 my plug-in broke. Eventually I fixed my plug-in by adding this following line
If you create a plugin that includes an import but not a lib dependency then you should be able to see exactly what I saw.
Thanks again |
I am writing in python only because I very much like albert and I wish to write some of my own plugins😃 That's at least a honest answer which I appreciate. |
Following on from #1423.
Currently a python plugin that imports any dist packages is required to have a metadata line like below. Then albert will show the user a dialog asking to import the dependencies, and they will be copied. If the metadata is missing, then the dialog still appears, but the import then fails with a strange error message.
md_lib_dependencies = "ZZZ"
For many users this is unnecessarily complicated, and perhaps they don't need to use a Virtualenv at all. The copied import is presumably "stuck" at this version while the base version gets updated automatically (for example using the OS package manager). The import process can be confusing for the user, especially when it fails.
Suggestions
metadata_.runtime_dependencies
. If not, instead show an error that informs the user that the metadata is missing.The text was updated successfully, but these errors were encountered: