Skip to content

Add Linux tools#2

Open
jayvdb wants to merge 2 commits intojamesabel:masterfrom
jayvdb:linux
Open

Add Linux tools#2
jayvdb wants to merge 2 commits intojamesabel:masterfrom
jayvdb:linux

Conversation

@jayvdb
Copy link

@jayvdb jayvdb commented Oct 4, 2019

Results were PyInstaller onefile and Nuitka passed, the others did not, but not much time was invested into trying to debug/correct them.

@jayvdb
Copy link
Author

jayvdb commented Oct 8, 2019

I tweaked the cwd, and now all except cx_Freeze pass.

@jamesabel
Copy link
Owner

Thanks - I'll take a look at this soon.

@jayvdb
Copy link
Author

jayvdb commented Oct 11, 2019

@anthony-tuininga, is there some voodoo missing to make cx_Freeze work with this example?

@jayvdb
Copy link
Author

jayvdb commented Oct 12, 2019

Also added PyOxidizer which seems to not work for this app due to Qt. ping @indygreg

@anthony-tuininga
Copy link

@jayvdb, I'll take a look but I don't use either macOS or Windows. You can ask @marcelotduarte if he is able to test on Windows or macOS.

anthony-tuininga added a commit to marcelotduarte/cx_Freeze that referenced this pull request Oct 27, 2019
@anthony-tuininga
Copy link

For me, all that was missing was the cffi package (implicitly loaded by the cryptography package), so I added a hook for it. You can also use the following setup.py instead:

from cx_Freeze import setup, Executable

executables = [
    Executable('main.py')
]

options = {
    'build_exe': {
        'packages': 'cffi'
    }
}

setup(name='cx_freeze_mac',
      version='0.1',
      description='cx_freeze_mac',
      executables=executables,
      options=options
      )

@jayvdb
Copy link
Author

jayvdb commented Oct 27, 2019

@anthony-tuininga , when I try that addition to the setup.py, I get

Traceback (most recent call last):
  File "/home/jayvdb/projects/python/spafit/test_cx_freeze_linux/venv/lib64/python3.7/site-packages/cx_Freeze/initscripts/__startup__.py", line 40, in run
    module.run()
  File "/home/jayvdb/projects/python/spafit/test_cx_freeze_linux/venv/lib64/python3.7/site-packages/cx_Freeze/initscripts/Console.py", line 23, in run
    exec(code, {'__name__': '__main__'})
  File "main.py", line 6, in <module>
    import cryptography.fernet
  File "/home/jayvdb/projects/python/spafit/test_cx_freeze_linux/venv/lib64/python3.7/site-packages/cryptography/fernet.py", line 18, in <module>
    from cryptography.hazmat.primitives import hashes, padding
  File "/home/jayvdb/projects/python/spafit/test_cx_freeze_linux/venv/lib64/python3.7/site-packages/cryptography/hazmat/primitives/padding.py", line 13, in <module>
    from cryptography.hazmat.bindings._padding import lib
ImportError: libffi-d78936b1.so.6.0.4: cannot open shared object file: No such file or directory

When I use cx_Freeze git master, I still see that error, but with libffi-10449faf.so.5.0.6 instead of libffi-d78936b1.so.6.0.4, but I guess that is irrelevant.

@marcelotduarte
Copy link

I have a patch (not merged yet) to catch this error: marcelotduarte/cx_Freeze#494
I can try with my branch to test changing the requirements:
https://github.com/marcelotduarte/cx_Freeze/archive/develop.zip

@marcelotduarte
Copy link

And about the change at setup mentioned by @anthony-tuininga, you have to have
includes: '_cffi_backend'
instead of packages: 'cffi'.
This is sufficient.

@jayvdb
Copy link
Author

jayvdb commented Oct 28, 2019

Ok, I got that to work by adding LD_LIBRARY_PATH=build/.../lib . It seems rpath isnt being set for the bin to find its libs automatically. I'll tidy it up and submit.

@jayvdb
Copy link
Author

jayvdb commented Jul 20, 2020

ping @jamesabel

1 similar comment
@jayvdb
Copy link
Author

jayvdb commented Sep 28, 2024

ping @jamesabel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants