SSLError in Requests when packaging as OS X .app

后端 未结 4 1448
傲寒
傲寒 2021-02-06 08:44

I\'m developing an application for OS X. The application involves communicating with a server through python-requests, using a secure connection.

I am able to run the p

4条回答
  •  长情又很酷
    2021-02-06 09:25

    The easiests workaround is to add an option for py2app to your setup.py file:

    setup(
       ...
       options={
          'py2app':{
              'packages': [ 'requests' ]
           }
       }
    )
    

    This includes the entire package into the application bundle, including the certificate bundle.

    I've filed an issue for this in my py2app tracker, a future version of py2app will include logic to detect the use of the request library and will copy the certificate bundle automaticly.

提交回复
热议问题