-->

Include openssl in app

2019-08-02 04:52发布

问题:

I am trying to build a standalone version of Bitmessage for OS X. So far, I have managed to include PyQt4 in the build by having the following setup.py:

from setuptools import setup

APP = ['bitmessagemain.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True,
 'iconfile': '/Users/jackson/Desktop/Bitmessagelogo-reduced.icns', 'includes': ['PyQt4']}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)

I can't seem to figure out how to bundle openssl in my includes. Does anyone know?

回答1:

Py2app should detect a dependency on openssl if there is an import statement for an extension that links with openssl (for example the stdlib SSL support or pyOpenSSL).

That said, py2app will not include the copy of openssl from /usr/lib into your application bundle. Files from system locations (such as /usr/lib and /System) are assumed to be operating system files and are never included in bundles created by py2app.