pyLODE icon indicating copy to clipboard operation
pyLODE copied to clipboard

Automate generation of executables

Open nicholascar opened this issue 4 years ago • 27 comments

In bin/ there is a pylode.app (Mac), pylode.exe (Windows) & pylode.sh (Linux) executable. They are currently not rebuilt with each push or release but they should be!

nicholascar avatar Apr 19 '20 08:04 nicholascar

Anyone game to explore this?

dr-shorthair avatar May 27 '20 00:05 dr-shorthair

I've added a latest Windows exe and a Mac App file. Not exactly auto but they are up to date this morning as of pyLODE 2.4.

I can generate Windows files now (a new laptop) but if there was an automated process, that would be nice. Certain build systems do do this - @jyucsiro?

nicholascar avatar May 27 '20 00:05 nicholascar

Just came across this ticket and thought I'd just mention that, although I'm not familiar at all with how things are set up in this project, what about using gihub actions https://github.com/features/actions ?

carueda avatar May 27 '20 00:05 carueda

what about using gihub actions https://github.com/features/actions ?

I think that's likely the way to go. I'll try and get a chance to look into it but I believe that Actions does loads of things like making executables, I've just not used it yet!

I don want something like this in place to rebuild the exe files at least per GitHub & PyPI release.

nicholascar avatar May 27 '20 00:05 nicholascar

Unfortunately 'latest Windows exe' is missing something - image

This problem has occurred before #51

dr-shorthair avatar May 28 '20 00:05 dr-shorthair

Any chance of a manual re-build. The current .exe is 2.4

dr-shorthair avatar Sep 07 '20 07:09 dr-shorthair

Ping rebuild of the executables - now 8/9 months behind :-(

dr-shorthair avatar Feb 22 '21 04:02 dr-shorthair

I’m going to put out a new build tonight since a couple of useful updates have come through. I’ll also update https://pylode.surroundaustralia.com/

Nick

— Dr Nicholas Car Data Systems Architect SURROUND Australia 0477 560 177 [email protected]

On 22 Feb 2021, at 2:23 pm, Simon Cox [email protected] wrote:

 Ping rebuild of the executables - now 8/9 months behind :-(

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

nicholascar avatar Feb 22 '21 05:02 nicholascar

Try pulling now @dr-shorthair: I have produced a v2.8.6 Windows binary

nicholascar avatar Feb 23 '21 14:02 nicholascar

I wish I was able to automate this but I do seem to have to tinker with pyinstaller each time I produce a Windows EXE (infrequent that that is)

nicholascar avatar Feb 23 '21 14:02 nicholascar

That's good, thanks @nicholascar

dr-shorthair avatar Feb 24 '21 05:02 dr-shorthair

Windows exe missing some libraries?

image

dr-shorthair avatar May 11 '21 07:05 dr-shorthair

Looks like the rdflib JSON-LD plugin is missing. Which is weird since it's been listed in the requirements.txt file for many releases (https://github.com/RDFLib/pyLODE/blob/master/requirements.txt#L4). Might have to check the pyinstaller build manifest to see if it's listed.

nicholascar avatar May 11 '21 11:05 nicholascar

Even weirder: that specific plugin is listed in the pyinstaller manifest: (https://github.com/RDFLib/pyLODE/blob/master/pylode/pylode-cli.spec#L21)

nicholascar avatar May 11 '21 11:05 nicholascar

:-(

dr-shorthair avatar May 13 '21 07:05 dr-shorthair

There's always http://pylode.surroundaustralia.com/ online if you're desperate. I think it's a few versions behind but does work

On Thu, May 13, 2021 at 5:10 PM Simon Cox @.***> wrote:

:-(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RDFLib/pyLODE/issues/61#issuecomment-840366638, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABX3SEGHOJWZX45VZCFXGJ3TNN3OHANCNFSM4MLWF25Q .

nicholascar avatar May 13 '21 07:05 nicholascar

I carefully kept a copy of the last version that worked, so have reverted to that already.

dr-shorthair avatar May 13 '21 07:05 dr-shorthair

You don’t have to be careful: al previous versions are here in GutHub for download: each tagged release is saved forever.

I’ll remove the faulty release deliberately when I create a later working one.

nicholascar avatar May 13 '21 09:05 nicholascar

Still can’t work this out but I can say that a 6.0.0 release of RDFlib that incorporated the JSON-LD module would avoid this by internalising the dependency.

nicholascar avatar May 13 '21 22:05 nicholascar

i've had a go at building this.

@dr-shorthair @nicholascar would you mind testing the attached .exe out? pyLODE.zip

jyucsiro avatar May 14 '21 02:05 jyucsiro

I get a message saying "The system cannot execute the specified program" and that's a permissions issue since my laptop then deletes the EXE and complains about a trojan!

Did you change anything in the pyinstaller code?

Nick

nicholascar avatar May 14 '21 04:05 nicholascar

ok. there were a few things. wrote a pyinstaller spec file and included all hiddenimports. also needed to add a few files to be bundled in. i'll create a PR with the code

jyucsiro avatar May 14 '21 04:05 jyucsiro

What about the permissions issue? My laptop thinks there's malware in the exe.

On Fri, May 14, 2021 at 2:40 PM Jonathan Yu @.***> wrote:

ok. there were a few things. wrote a pyinstaller spec file and included all hiddenimports. also needed to add a few files to be bundled in. i'll create a PR with the code

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RDFLib/pyLODE/issues/61#issuecomment-841001192, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABX3SEESL6MD5KFYICZMP6TTNSSUBANCNFSM4MLWF25Q .

nicholascar avatar May 14 '21 05:05 nicholascar

I just tested the attached exe. Works fine, though there is an erroneous error message:

image

In the source it was dct:license <https://creativecommons.org/publicdomain/zero/1.0/> ; but I get the same error with dct:license "https://creativecommons.org/publicdomain/zero/1.0/"^^xsd:anyURI ;

dr-shorthair avatar May 19 '21 06:05 dr-shorthair

That's an underlying error message that's bubbled up from RDFlib and what's happening is that some graph somewhere is being fed the HTML version of a URI, not a plain RDF URI. Likely in the schema.org annotations for the HTML.

@dr-shorthair can you please just look at the source of the HTML file you just generated and see if the schema.org RDF looks ok? Should be equivalent to here: https://github.com/GeoscienceAustralia/FSDF/blob/master/network.html#L206. If that looks ok, then the issue must have surfaced elsewhere.

I'll try and reproduce the error when I next run on Windows.

nicholascar avatar May 19 '21 07:05 nicholascar

Schema.org license is broken (assuming it should just be the URI)-

    "https://schema.org/license": [
      {
        "@id": "<a href=\"https://creativecommons.org/publicdomain/zero/1.0/\">https://creativecommons.org/publicdomain/zero/1.0/</a>"
      }
    ],

dr-shorthair avatar May 19 '21 07:05 dr-shorthair

Great, thanks for the confirmation: I can fix that!

nicholascar avatar May 19 '21 07:05 nicholascar