View Single Post
Old 06-21-2021, 09:25 PM   #1
jpwhiting
Junior Member
jpwhiting began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jun 2014
Device: Android phone
Plugin dependencies

Hello, I thought I'd take a stab at making a google play books upload plugin for calibre.

I created a test python3 script that is able to upload a test epub file to my google drive after authenticating, getting permission, etc. using google-api-python-client and google-auth-oauthlib, etc. and made a gui calibre plugin to upload selected books on button press, but am having difficulty getting the python dependencies figured out.

From looking at the WordDumb plugin example I see they are using pip to install their dependencies. Is that the best way to go about it? From reading https://gis.stackexchange.com/questi...python-library I thought maybe I'd just include the dependent .whl files inside the .zip, add them to the python path, and import that way, but that doesn't seem to work. When my plugin is loaded it complains that it can't find the googleapiclient module still with those paths in the python path.

I guess if needed I can pip install the dependencies on any user's device, but that seems a bit overreaching. What's the best way to approach this?

thanks,
Jeremy Whiting
jpwhiting is offline   Reply With Quote