Is it possible to condition an addon import requirement?
#1
Since UWP doesn't allow for the cherrypy python module, I adjusted Skin Helper code to except import error for cherrypy and tick off the use of its Webservice.
Only problem is in the addon.xml under <requires> I want to exclude cherrypy import for UWP, there's already the System.Platform.UWP Bool but is it possible to use it in the addon.xml?
Reply
#2
nope, not possible.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
(2019-03-04, 16:17)ronie Wrote: nope, not possible.
So what's the alternative? having a skin for uwp and one for all other platfroms, that each call its own skin helper? with the only thing that differs is the required line? Sad
Reply
#4
i don't think i fully understand the problem?
why would a skin need to import the cherrypy module? that should be done by the skin helper addon, no?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
Are you sure you can’t use the cherrypy module? What happens if you include it within your add-on package?

I ask because I’m fairly sure, when I was testing this module, granted it wasn’t added as a dependency but rather included within my test add-on, it did work. There is a modded cherrypy version, forked from marcelveldt’s cherrypy package for Kodi, that was modded to run without the packages that do not work on UWP and Android.
Reply
#6
(2019-03-04, 16:59)ronie Wrote: i don't think i fully understand the problem?
why would a skin need to import the cherrypy module? that should be done by the skin helper addon, no?


The skin depends on the skin helper which depends on cherrypy.
Reply
#7
(2019-03-04, 16:59)ronie Wrote: i don't think i fully understand the problem?
why would a skin need to import the cherrypy module? that should be done by the skin helper addon, no?
 Titan is heavily reliant on Skin Helper, so skin requires SH -> requires CherryPy...
I have to check how much of an impact will result if SH is not required by the skin, but this is the current situation.

(2019-03-04, 16:59)angelblue05 Wrote: Are you sure you can’t use the cherrypy module? What happens if you include it within your add-on package?

I ask because I’m fairly sure, when I was testing this module, granted it wasn’t added as a dependency but rather included within my test add-on, it did work. There is a modded cherrypy version, forked from marcelveldt’s cherrypy package for Kodi, that was modded to run without the packages that do not work on UWP and Android.
Could you share a link to this fork?
Reply
#8
ok, so skin helper imports cherrypy and gracefully handles the import exception.
so what problem remains?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#9
If you are interested. This was the version I used for testing.

https://github.com/TheTimeWalker/script.module.cherrypy

Good luck
Reply
#10
(2019-03-04, 17:05)ronie Wrote: ok, so skin helper imports cherrypy and gracefully handles the import exception.
so what problem remains?
 that skin helper's addon.xml has cherrypy module under required imports, otherwise I wouldn't be able to import it via script.
Reply
#11
@angelblue05 

Correct me if I'm wrong, but in our cherrypy tests we were able to have this module running on the UWP app? I cannot remember if we tested both of our webservice implementations.
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#12
(2019-03-04, 17:10)sualfred Wrote: @angelblue05 

Correct me if I'm wrong, but in our cherrypy tests we were able to have this module running on the UWP app? I cannot remember if we tested both of our webservice implementations.


Yes that’s right. We tested with cherrypy with that fork I linked above.
Reply
#13
i'm sorry, still not able to understand the problem... perhaps someone else can help you out.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply

Logout Mark Read Team Forum Stats Members Help
Is it possible to condition an addon import requirement?0