Page 1 of 1

Preferred way to include a py library in your plugin ?

PostPosted: Sun Sep 26, 2021 8:40 am
by ryanbuckner
I have a plugin that requires geopy to be installed on the server. What's the best practice for plugins that require another library?

1) Include the .py file in the plugin package ?
2) Require the user to install the .py and include instructions ?
3) Is there another way?

Re: Preferred way to include a py library in your plugin ?

PostPosted: Sun Sep 26, 2021 2:05 pm
by FlyingDiver
I used to do #2, but now I mostly do #1.

Re: Preferred way to include a py library in your plugin ?

PostPosted: Sun Sep 26, 2021 2:19 pm
by berkinet
#1

Re: Preferred way to include a py library in your plugin ?

PostPosted: Sun Sep 26, 2021 4:38 pm
by ryanbuckner
Thank you both. I have packaged the libraries with the plugin

Re: Preferred way to include a py library in your plugin ?

PostPosted: Mon Sep 27, 2021 9:24 am
by RogueProeliator
Thank you both. I have packaged the libraries with the plugin

I personally think that is best when you are able to include the Python source. There are times that it requires other dependencies that make it troublesome, but when possible I like including the source. That ensures the proper version is available and reduces user involvement.

Adam