Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 08-07-2023, 11:14 AM   #16
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,251
Karma: 5568412
Join Date: Nov 2009
Device: many
odamizu,
If you had an earlier version of Doitsu's Markdown plugin installed and its prefs are not empty, then it will assume it knows the path to the cmark executable and will not run os.chmod on the binary.

The easiest approach it to temporarily rename the Markdown preferences folder once. Then fire up Markdown and it will look for the new cmark executable and properly chmod it to be executable.

You should be able to put the renamed Markdown prefs folder back or just set new preferences.

This worked for me.

I will build a universal binary for macOS and provide it to Doitsu when I am home and have access to my arm64 machine.
KevinH is offline   Reply With Quote
Old 08-07-2023, 11:41 AM   #17
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,251
Karma: 5568412
Join Date: Nov 2009
Device: many
Unfortunately, this same problem will exist every time this plugin is updated on macOS. And I do not think a preference setting will help. FWIW, since a chmod is cheap, in plugins I simply just use os.chmod for macOS binaries on every run. We did this in flightcrew and in AccessAide. Not sure how to detect the plugin changed when the preferences did not.

Perhaps include a new datetime value hardcoded in every plugin and check if prefs version of that value is different from current and run os.chmod if not equal.

Of course reinstalls of the same version would still fail.

The only other approach would be to run os.stat and get the st_mod bits and check if execute permissions are set and if not set them. But just setting them each time is easier which is what we ended up doing.

Last edited by KevinH; 08-07-2023 at 11:46 AM.
KevinH is offline   Reply With Quote
Advert
Old 08-07-2023, 01:49 PM   #18
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,251
Karma: 5568412
Join Date: Nov 2009
Device: many
@Doitsu,
Okay, I figured out how to build a universal binary (arm64, x86_64) from just my x86_64 laptop statically linked for cmark-gfm

I have attached it as a zip to this post.

See cmark-gfm.zip

lipo shows this binary supports both arm64 and x86_64.

I tested the x86_64 side by install your MarkdownImport plugin, replacing the binary with the unzipped cmark-gfm, and then manually removing the MarkdownImport.json from its Preferences to force the os.chmod to be done.

It worked just fine.

I do think at some point we need to add a post plugin install interface call out to the plugin so that one time initialization can be done. I will think about adding something like that to the plugin interface for a future release.

Take care,

KevinH
Attached Files
File Type: zip cmark-gfm.zip (198.8 KB, 477 views)
KevinH is offline   Reply With Quote
Old 08-07-2023, 03:07 PM   #19
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,647
Karma: 23456789
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
Okay, I figured out how to build a universal binary (arm64, x86_64) from just my x86_64 laptop statically linked for cmark-gfm
Thanks! I've replaced the macOS binary in the MarkdownImport plugin .zip file with your version and attached it to first post in the MarkdownImport plugin thread.
Doitsu is offline   Reply With Quote
Old 08-07-2023, 03:44 PM   #20
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,719
Karma: 6653246
Join Date: Mar 2015
Device: Kindle, iOS
Thanks Doitsu! Thanks KevinH!

I downloaded the new latest MarkdownImport plugin (0.1.5.4), did the thing with the preferences folder, and all is good on Sigil 1.9.30 on macOS Ventura

ETA: I installed Sigil 2.0.0-Beta-Mc-x86_64.txz and have been playing with it, running plugins, etc. So far so good

Quote:
Originally Posted by Doitsu View Post
Thanks! I've replaced the macOS binary in the MarkdownImport plugin .zip file with your version and attached it to first post in the MarkdownImport plugin thread.

Last edited by odamizu; 08-08-2023 at 02:23 AM.
odamizu is offline   Reply With Quote
Advert
Old 11-16-2023, 05:48 AM   #21
derrickoswald
Junior Member
derrickoswald began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: Sigil
Has anyone perhaps hit this snag?
I'm getting a PySide6 Missing from the testplugin_v020.zip, after installing PySide6:

$ pip3 install PySide6
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: PySide6 in /home/derrick/.local/lib/python3.10/site-packages (6.6.0)
Requirement already satisfied: PySide6-Addons==6.6.0 in /home/derrick/.local/lib/python3.10/site-packages (from PySide6) (6.6.0)
Requirement already satisfied: shiboken6==6.6.0 in /home/derrick/.local/lib/python3.10/site-packages (from PySide6) (6.6.0)
Requirement already satisfied: PySide6-Essentials==6.6.0 in /home/derrick/.local/lib/python3.10/site-packages (from PySide6) (6.6.0)

The specific exceptions are:

Python Package: PySide6 Missing
/usr/lib/x86_64-linux-gnu/libQt6DBus.so.6: undefined symbol: _ZN9QtPrivate23CompatPropertySafePointC1EP14QBindi ngStatusP20QUntypedPropertyData, version Qt_6
Python Package: PySide6 QtWebEngineWidgets Missing
/usr/lib/x86_64-linux-gnu/libQt6DBus.so.6: undefined symbol: _ZN9QtPrivate23CompatPropertySafePointC1EP14QBindi ngStatusP20QUntypedPropertyData, version Qt_6
derrickoswald is offline   Reply With Quote
Old 11-16-2023, 06:06 AM   #22
derrickoswald
Junior Member
derrickoswald began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: Sigil
Following the Dependencies section of https://pypi.org/project/PySide6/ doesn't seem to fix it:

LLVM_INSTALL_DIR=/opt/clang/libclang
derrickoswald is offline   Reply With Quote
Old 11-16-2023, 06:39 AM   #23
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,077
Karma: 199770456
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
That environment variable is only relevant when building PySide6.

I've not had much experience with a Sigil plugin Python environment that includes packages installed to a user site directory instead of the system one. Can you show me what the test p!gain shows for sys.path locations? It should be some of the very first output when running the testplugin.

The fact that Debian/Ubuntu doesn't yet supply their own PySide6 packages (to be installed via apt-get) is unfortunate. Problems like yours are not likely to go away until they do.

One quick thing to try is to skip the sigil launch script in /usr/local/bin and launch sigil directly from a command prompt using:

/usr/local/lib/sigil/sigil

If Sigil starts ok, try running the test plugin again.

Last edited by DiapDealer; 11-16-2023 at 06:59 AM.
DiapDealer is offline   Reply With Quote
Old 11-16-2023, 10:47 AM   #24
derrickoswald
Junior Member
derrickoswald began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: Sigil
Quote:
Originally Posted by DiapDealer View Post
One quick thing to try is to skip the sigil launch script in /usr/local/bin and launch sigil directly from a command prompt using:

/usr/local/lib/sigil/sigil

If Sigil starts ok, try running the test plugin again.
OK, the raw invocation worked:

Code:
Wrapped: /opt/sigil/bin/sigil

Status: success

 
Verify sys.path settings manually
  /opt/sigil/share/sigil/plugin_launchers/python
  /usr/lib/python310.zip
  /usr/lib/python3.10
  /usr/lib/python3.10/lib-dynload
  /home/derrick/.local/lib/python3.10/site-packages
  /usr/local/lib/python3.10/dist-packages
  /usr/lib/python3/dist-packages
  /home/derrick/.local/share/sigil-ebook/sigil/plugins/testplugin
 
Verifying proper Python packages are available
  Checking GUI modules
    Python Package: PySide6 Missing
/usr/lib/x86_64-linux-gnu/libQt6DBus.so.6: undefined symbol: _ZN9QtPrivate23CompatPropertySafePointC1EP14QBindingStatusP20QUntypedPropertyData, version Qt_6
    Python Package: PySide6 QtWebEngineWidgets Missing
/usr/lib/x86_64-linux-gnu/libQt6DBus.so.6: undefined symbol: _ZN9QtPrivate23CompatPropertySafePointC1EP14QBindingStatusP20QUntypedPropertyData, version Qt_6
    Python Package: tkinter (/usr/lib/python3.10/tkinter/__init__.py) Found
  Python Package: PIL (/usr/lib/python3/dist-packages/PIL/__init__.py) Found
  Python Package: cssselect (/usr/lib/python3/dist-packages/cssselect/__init__.py) Found
  Python Package: css-parser (/usr/lib/python3/dist-packages/css_parser/__init__.py) Found
  Python Package: html5lib (/usr/lib/python3/dist-packages/html5lib/__init__.py) Found
  Python Package: lxml (/usr/lib/python3/dist-packages/lxml/__init__.py) Found
  Python Package: regex (/usr/lib/python3/dist-packages/regex/__init__.py) Found
  Python Package: chardet (/usr/lib/python3/dist-packages/chardet/__init__.py) Found
  Python Package: six (/usr/lib/python3/dist-packages/six.py) Found
  Python Package: dulwich (/usr/lib/python3/dist-packages/dulwich/__init__.py) Found
  Python Package: urllib3 (/usr/lib/python3/dist-packages/urllib3/__init__.py) Found
 
Verifying Sigil Python Libraries can be found/loaded
  Sigil Python library: epub_utils Found
  Sigil Python library: quickparser Found
  Sigil Python library: hrefutils Found
  Sigil Python library: compatibility_utils Found
  Sigil Python library: sigil_bs4 Found
 
Verifying Hunspell Spell Checking
  Hunspell en_US affix file and dictionary Found
  Hunspell shared library Found
  Hunspell spellchecking works True
  
Verifying Sigil Gumbo Library operation
  Sigil Gumbo BS4 Adapter library Found
  Sigil BS4/Gumbo Parser works True
 
Verifying selected basic plugin interface elements
  bk.text_iter() works True
  Listing manifested files...
    Text/Section0001.xhtml
    toc.ncx
  bk.manifest_iter() works True
  bk.spine_iter() works True
  bk.other_iter() works True
  reading a non-manifest book file works True
  reading a specific OPF manifest id works True
  writing to a specific OPF manifest id works True
  Launcher Version 20231026
  ePub Version 2.0
  adding your own file to the manifest works True
  basename to id mapping works True
  deleting our added file works True
 
 
Failure -  2  Tests of Plugin Operations Failed



Raw: /opt/sigil/lib/sigil/sigil

Status: success

 
Verify sys.path settings manually
  /opt/sigil/share/sigil/plugin_launchers/python
  /usr/lib/python310.zip
  /usr/lib/python3.10
  /usr/lib/python3.10/lib-dynload
  /home/derrick/.local/lib/python3.10/site-packages
  /usr/local/lib/python3.10/dist-packages
  /usr/lib/python3/dist-packages
  /home/derrick/.local/share/sigil-ebook/sigil/plugins/testplugin
 
Verifying proper Python packages are available
  Checking GUI modules
    Python Package: PySide6 QtWebEngine PySide6 Python bindings found.
(/home/derrick/.local/lib/python3.10/site-packages/PySide6/QtWidgets.abi3.so) Found
    Python Package: PySide6 QtWebEngineWidgets (/home/derrick/.local/lib/python3.10/site-packages/PySide6/QtWebEngineWidgets.abi3.so) Found
    Python Package: tkinter (/usr/lib/python3.10/tkinter/__init__.py) Found
  Python Package: PIL (/usr/lib/python3/dist-packages/PIL/__init__.py) Found
  Python Package: cssselect (/usr/lib/python3/dist-packages/cssselect/__init__.py) Found
  Python Package: css-parser (/usr/lib/python3/dist-packages/css_parser/__init__.py) Found
  Python Package: html5lib (/usr/lib/python3/dist-packages/html5lib/__init__.py) Found
  Python Package: lxml (/usr/lib/python3/dist-packages/lxml/__init__.py) Found
  Python Package: regex (/usr/lib/python3/dist-packages/regex/__init__.py) Found
  Python Package: chardet (/usr/lib/python3/dist-packages/chardet/__init__.py) Found
  Python Package: six (/usr/lib/python3/dist-packages/six.py) Found
  Python Package: dulwich (/usr/lib/python3/dist-packages/dulwich/__init__.py) Found
  Python Package: urllib3 (/usr/lib/python3/dist-packages/urllib3/__init__.py) Found
 
Verifying Sigil Python Libraries can be found/loaded
  Sigil Python library: epub_utils Found
  Sigil Python library: quickparser Found
  Sigil Python library: hrefutils Found
  Sigil Python library: compatibility_utils Found
  Sigil Python library: sigil_bs4 Found
 
Verifying Hunspell Spell Checking
  Hunspell en_US affix file and dictionary Found
  Hunspell shared library Found
  Hunspell spellchecking works True
  
Verifying Sigil Gumbo Library operation
  Sigil Gumbo BS4 Adapter library Found
  Sigil BS4/Gumbo Parser works True
 
Verifying selected basic plugin interface elements
  bk.text_iter() works True
  Listing manifested files...
    Text/Section0001.xhtml
    toc.ncx
  bk.manifest_iter() works True
  bk.spine_iter() works True
  bk.other_iter() works True
  reading a non-manifest book file works True
  reading a specific OPF manifest id works True
  writing to a specific OPF manifest id works True
  Launcher Version 20231026
  ePub Version 2.0
  adding your own file to the manifest works True
  basename to id mapping works True
  deleting our added file works True
 
 
Success - All Tests of Plugin Operations Passed
derrickoswald is offline   Reply With Quote
Old 11-16-2023, 10:54 AM   #25
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,077
Karma: 199770456
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
What did you use for an install prefix when configuring Sigil? And why? I'm a little concerned that Sigil has been installed to /opt rather than the typical /usr/local. You're changing things that really shouldn't be altered if you don't know exactly what you're doing.

I've never seen this output from Sigil's test plugin before:
Code:
Wrapped: /opt/sigil/bin/sigil

Last edited by DiapDealer; 11-16-2023 at 10:57 AM.
DiapDealer is offline   Reply With Quote
Old 11-16-2023, 11:23 AM   #26
derrickoswald
Junior Member
derrickoswald began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: Sigil
Quote:
Originally Posted by DiapDealer View Post
What did you use for an install prefix when configuring Sigil? And why? I'm a little concerned that Sigil has been installed to /opt rather than the typical /usr/local. You're changing things that really shouldn't be altered if you don't know exactly what you're doing.

I've never seen this output from Sigil's test plugin before:
Code:
Wrapped: /opt/sigil/bin/sigil
That was just added by me to explain the two different outputs (wrapped vs raw).

The install prefix was:
Code:
-DCMAKE_INSTALL_PREFIX=/opt/sigil
The reason is, I try to put any manually installed stuff in /opt as a means of tracking and hence being able to quickly delete installations by removing a directory.

By the way, if I just remove the QTLIB_DIR definition in that wrapper script:
Code:
#QTLIB_DIR="/usr/lib/x86_64-linux-gnu"
QTLIB_DIR=""
it works correctly (at least the testplugin and a quick smoketest), so I'm good with that.
Thanks for the heads-up about the wrapper.
derrickoswald is offline   Reply With Quote
Old 11-16-2023, 12:12 PM   #27
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,077
Karma: 199770456
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by derrickoswald View Post
By the way, if I just remove the QTLIB_DIR definition in that wrapper script:
Code:
#QTLIB_DIR="/usr/lib/x86_64-linux-gnu"
QTLIB_DIR=""
it works correctly (at least the testplugin and a quick smoketest), so I'm good with that.
Thanks for the heads-up about the wrapper.
That (removing the QTLIB_DIR) was what I was trying to test by launching Sigil directly (without the wrapper).

Just know that if you ever rebuild/install, you'll need to diddle that wrapper again.

I may look into adding functionality (through an environment variable) that will avoid adding the QTLIB_DIR to the LD_LIBRARY_PATH in the first place. It's not need when using the system Qt, and as you've now noticed: it interferes with a PyPi installed PySide6 (which comes with its own Qt libs). Adding QT_LIBS to LD_LIBRARY_PATH was necessary when custom versions of Qt were being installed and used to build Sigil with.

Sorry about the wrapped/raw confusion. I didn't scroll down far enough to see that there were two separate outputs generated.

Last edited by DiapDealer; 11-16-2023 at 12:14 PM.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 495 10-19-2024 07:06 AM
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB lrpirlet Plugins 2 08-18-2022 04:15 PM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 14 04-04-2021 06:25 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


All times are GMT -4. The time now is 03:30 AM.


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