Skip to content
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

Suggestion: Easier way to find/install plugins #37

Open
hugosenari opened this issue Feb 12, 2017 · 9 comments
Open

Suggestion: Easier way to find/install plugins #37

hugosenari opened this issue Feb 12, 2017 · 9 comments

Comments

@hugosenari
Copy link

Define a method for plugin distribution. Create an interface based on this method. This will help spread new/third party plugins.

My solution uses python packages and PyPI as repository, so we can install plugin as any python package with pip.

Ie: pip install kupfer_plugin_marketplace (this plugin list PyPI packages that starts with kupfer_plugin and add action to install them)

The main hack at this is a custom setup.py that copy plugin file to userspace plugin directory.

The proper solution could have more integrated interface (maybe in preferences) and do things I don't know how to do (enable plugin after install, install in other thread...).

If we stay with PyPI/pip approach, there is also a cookiecutter that help with boring part of package creation.

@hugosenari
Copy link
Author

To discuss a new feature pointed by @bluss in #33

@bluss
Copy link
Member

bluss commented Feb 12, 2017

It needs to be clean in some way to be included in kupfer, so not entangle itself with the user's own pip files. I don't know much about pip.

@bluss
Copy link
Member

bluss commented Feb 12, 2017

One interesting feature is that Kupfer supports (*) importing plugins from .zip files (this is a common Python feature to support packages in .zip). That would enable installing plugins as single .zip files, even if they have a multifile package or included icons.

(*) This has now been tested after the port. Of course it needed one patch, a78bdc7

@bluss bluss added the Project label Feb 21, 2017
@hugosenari
Copy link
Author

Update: install plugins using new thread hugosenari/Kupfer-Plugins@e88c439

Pip download package and run package setup.py.
And my packages setup.py just copy plugin_file.py to ~/.local/share/kupfer/plugins/
I don't think this will mess with user pip files.

@bluss
Copy link
Member

bluss commented Feb 22, 2017

Oh you've updated it to Python 3, that's great. Does it work with new kupfer?

@hugosenari
Copy link
Author

Yes, it works. I tested with py3 and py2.

@bluss
Copy link
Member

bluss commented Feb 22, 2017

I get this when installing marketplace with the setup.py file, which is installing a lot of junk (pip3 etc) that disrupts my install.

python3 setup.py install
running install
mkdir ~/.local/share/kupfer/plugins
Copy ~/src/Kupfer-Plugins/marketplace/marketplace.py to ~/.local/share/kupfer/plugins
Install dependency
Searching for pip
Best match: pip 8.1.2
Adding pip 8.1.2 to easy-install.pth file
Installing pip script to ~/.local/bin
Installing pip3 script to ~/.local/bin
Installing pip3.5 script to ~/.local/bin

Using ~/anaconda3/lib/python3.5/site-packages
Processing dependencies for pip
Finished processing dependencies for pip

@bluss
Copy link
Member

bluss commented Feb 22, 2017

Your project is cool, it's along the lines of what Kupfer needs. I'll just give you my feedback and tell you what my approach would be.

It must be clean. No installing other files than the kupfer plugins. I'd using XDG_DATA_HOME with the ~/.local/share just a fallback, as is usual.

@hugosenari
Copy link
Author

Removed pip dependency: hugosenari/Kupfer-Plugins@334701e
Use XDG_DATA_HOME: hugosenari/Kupfer-Plugins@d2b59a7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants