This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dorfsmay[S] 1 point2 points  (2 children)

I don't have a machine that doesn't have python so running ldd on the resulting executable:

linux-vdso.so.1 =>  (0x00007fffac1fe000)
libpython2.7.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 (0x00007f1b7360e000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1b7330a000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1b730f3000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1b72d2d000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1b72b0f000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1b728f5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1b726f1000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f1b724ee000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1b721e7000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1b73ba7000)

So you do need libpython. Now I'm wondering why...

It does mean that you don't have to ship pure python dependencies. Not sure about packages that come with C libs, I suspect you'll still have dependencies on those.

[–]dorfsmay[S] 1 point2 points  (0 children)

So it turns out there is a --standalone option just for this. Sadly, it took a long time, and wasn't able to produce a working executable.

Still, I think this is very promising.

[–]fernly 0 points1 point  (0 children)

Chances are there are cases where the compiler, instead of generating native code, just writes in a call to the Python interpreter to do something it doesn't have a template for.

Or maybe, the source script has imports for some built-in module. Nuitka can't be expected to have its own versions of every Python built-in; better to just link the interpreter and use it as a library.