shoebot / plugin-shoebot

Integrate shoebot into editors and IDEs
0 stars 0 forks source link

Make gedit-shoebot plugin work #1

Closed stuaxo closed 6 years ago

stuaxo commented 6 years ago
stuaxo commented 6 years ago

Needs to be installable, need to find out what the story with WHLs is (maybe we just disable this) + remove as much custom code as possible from the installer.

The gedit install from setup.py could put plugin_shoebot into the correct directory for gedit, then add the .plugin file to the root.

Maybe ~dist_dir~ target directory can be set and then everything except the .plugin file work through ordinary setuptools

rlafuente commented 6 years ago

It's an old-ish repo, but how about this example for setup.py?

stuaxo commented 6 years ago

Interesting.. I might well use data-files, I need to see what happens on current setuptools, there's been a lot of churn in the last few years.

I'm going to include the logic we already have to find the correct gedit plugin directory, but cleaned up (hopefully most of it will be removed).

The structure will be something like

${gedit-plugin-dir}/plugin_shoebot ${gedit-plugin-dir}/shoebot.plugin ${language-dir}/shoebot.lang

I was getting a bit stuck as setuptools seems to be moving towards everything being a WHL, while plugin-shoebot can be one, the step to install it in the right place, and install the .plugin and .lang can't be... probably I shouldn't worry too much about that.

stuaxo commented 6 years ago

This is a pretty nice example of "does a bunch of stuff" setup.py

https://pypi.org/project/pypy_fix_cython_warning/#files

stuaxo commented 6 years ago

Installation is currently possible with this command from the root of the repo -

$ python -c 'from plugin_shoebot.install import libpeas'

Obviously setup.py will do the same things in the end.

But just gets you the same old plugin, with a couple of things broken.

One really surprising thing about breaking this code up, is quite how much there is inside our extensions.

Needs a bit more iteration before installing is fixed, and then can start extracting things so that a plugin API starts emerging.

stuaxo commented 6 years ago

Currently, pip install plugin_shoebot installs the gedit plugin (except on OSX, where I don't know the plugin location).

This will probably change to something like:

Install API:

pip install plugin_shoebot

Install gedit plugin

pip install plugin_shoebot --plugins=gedit

I'll probably make a command plugin_shoebot that can install the plugins without using pip, something like:

plugin_shoebot install gedit