Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 10-29-2021, 05:57 AM   #16
fake-name
Member
fake-name began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jun 2008
Device: PRS-505
Quote:
Originally Posted by kovidgoyal View Post
Read the error message, you are missing qmake.
FileNotFoundError: [Errno 2] No such file or directory: 'qmake'

Those instructions are not meant for spoon feeding.
*Sigh*

I mean, duh.

Literally the entire description of what you need to do first is:

Quote:
Building must run on a Linux computer.
Not, "On a linux system, with the required dependencies", not "on a linux system with qmake and <other dependencies> installed". They say "You need linux to run this".

Additionally, literally 2 lines above that:

Quote:
In general builds proceed in two steps, first build all the dependencies, then build the calibre installer itself.
I realize at this point I think the "bootstrap" step is supposed to be run in the build environment, but it's called out in the readme as "Requirements" before the step which builds the components on which it depends. "Requirements" implies "you need to do this first".

If nothing else, again, the documentation (such as it is) is extremely misleading.

Wrong documentation is worse then no documentation.

Last edited by fake-name; 10-29-2021 at 06:00 AM.
fake-name is offline   Reply With Quote
Old 10-29-2021, 06:13 AM   #17
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
*sigh* if you are stupid enough to believe that you can build anything on a "linux" computer without installing needed dependencies first, no amount of documentation is going to help you.

And given your attitude, I have zero interest in helping you further. Good bye and good luck.
kovidgoyal is offline   Reply With Quote
Old 11-05-2021, 03:29 AM   #18
fake-name
Member
fake-name began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jun 2008
Device: PRS-505
Quote:
Originally Posted by kovidgoyal View Post
*sigh* if you are stupid enough to believe that you can build anything on a "linux" computer without installing needed dependencies first, no amount of documentation is going to help you.

And given your attitude, I have zero interest in helping you further. Good bye and good luck.
Ahhh yes, the dependencies that aren't mentioned anywhere. Which is my entire point.

If your documentation says "it just needs a linux computer", you're LITERALLY SAYING IT HAS NO OTHER DEPENDENCIES.

I do expect to need the dependencies that the documentation says it needs. My whole point here, which were arguing about, is that the documentation says it needs nothing.
fake-name is offline   Reply With Quote
Old 11-15-2021, 06:25 PM   #19
wiso
Enthusiast
wiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it is
 
wiso's Avatar
 
Posts: 33
Karma: 2114
Join Date: Nov 2021
Device: kindle
Quote:
Originally Posted by fake-name View Post
I'm interested in extending the duplicate finding plugin to do aproximate text/cover matches. I've done both outside of calibre in the past in python successfully.

However, to do so, there are substantial library dependencies:

For text similarity (in a reasonable timeframe), I need a MinHashLSH implementation. I've used datasketch (https://github.com/ekzhu/datasketch) previously, which has a hard dependency on numpy (and I'd really like scipy, as MinHashLSH can use scipy for speeding up the initialization there).

For Image similarity, a DCT based p-hash works very well. I can use a pure python DCT implementation, but scipy provides convenent DCT functions, and I need it anyways for MinHashLSH.

What's the correct way for working on plugins like this? From what I've read there's no way to specify that your plugin has external dependencies (requirements.txt, etc...). Vendoring (and packaging) versions of all the packages for every platform is prohibitive.
Hi mate,
I had a similar problem trying to create my first plugin for calibre, and my solution was "simple" but effective ( Happy idea )

U can try this...
Add a folder with the library you needs to use in your project.
Import any library to unzip files like "import zipfile"
Extrat this folder in calibre plugin folder
(Example code ### unzip.py ###)
Code:
from calibre.utils.config import config_dir
UNZIP_PATH = Path(config_dir).joinpath("plugins/YOUR_PLUGIN_NAME")
UNZIP_M_PATH = Path(config_dir).joinpath("plugins/YOUR_PLUGIN_NAME/your_library_folder_name")
if Path.is_dir(UNZIP_M_PATH):
    print('This library folder already exists on your system')
else:
    for file in archive.namelist():
        if file.startswith('your_library_folder_name'):
            archive.extract(file, UNZIP_PATH)
4º Import your custom estracted libs from calibre/plugins folder
(example code for import your custom libs on main.py or whatever file.py)
Code:
import os
from calibre_plugins.YOUR_PLUGIN_NAME.unzip import UNZIP_PATH
sys.path.append(UNZIP_PATH)
os.chdir(UNZIP_PATH)

FROM your_library_folder_name import what_you_need

You can see the code on my plugin AudioBook_Duration on this forum.
AudioBook_Duration

I think it can be useful for you to use external libraries.

Last edited by wiso; 11-15-2021 at 06:28 PM.
wiso is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Systemwide installation of plugins / Discovery of installed plugins via pkg_resources t-8ch Development 8 11-14-2020 09:25 AM
Slow with large library luoto Calibre 17 02-06-2020 04:44 PM
Maintenance large library tomcooke General Discussions 11 06-11-2018 03:23 PM
Best way to get a large Calibre library into the PE library? Filark enTourage Archive 0 04-20-2011 10:18 PM
Networked db/large library a no-go? concern Calibre 3 02-03-2010 09:11 PM


All times are GMT -4. The time now is 01:31 PM.


MobileRead.com is a privately owned, operated and funded community.