![]() |
#1 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jul 2020
Device: reMarkable v1
|
Let Calibre Use Locally Built Version of Dependency on Windows?
I wanted to test Calibre with some modifications to the css-parser library. What's the simplest way to have it use a version I have modified locally?
Bonus points if it can use the css-parser source tree directly, though I don't mind running the css-parser installer after modifying it. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Just prepend the path to it to sys.path before it is imported.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jul 2020
Device: reMarkable v1
|
![]() This is what I saw it as when Calibre is running. I guess the third entry in that list causes it to prioritize the built-in "frozen" libraries?: Code:
sys.meta_path: [ <calibre.constants.DeVendor object at 0x000002128A2AA3A0>, <__main__.PydImporter object at 0x000002128A22C310>, BypyFrozenImporter with data in C:\Program Files\Calibre2\app\bin, <class '_frozen_importlib.BuiltinImporter'>, <class '_frozen_importlib.FrozenImporter'>, <class '_frozen_importlib_external.PathFinder'>, <calibre.constants.ExtensionsImporter object at 0x000002128A2B11F0> ] Code:
sys.meta_path.insert(0, sys.meta_path[5]) |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
From version 5 on, Calibre won't start on windows 10 | mhguda | Calibre | 17 | 12-29-2020 05:22 AM |
Creating recipes that have same cover page as Calibre built in version | duluoz | Recipes | 1 | 09-20-2020 10:05 PM |
Calibre: Difference between Windows & Mac Version? | Inukami | Calibre | 8 | 02-14-2018 08:53 AM |
New: 64 Bit Version of Calibre for Windows | country0129 | Calibre | 3 | 12-07-2012 12:48 PM |
Windows 7 New Calibre Version problem | Pandzilla | Calibre | 8 | 10-03-2010 02:15 PM |