GithubHelp home page GithubHelp logo

OSX fcntl not bundled? about esky HOT 3 CLOSED

cloudmatrix avatar cloudmatrix commented on August 23, 2024
OSX fcntl not bundled?

from esky.

Comments (3)

loopingz avatar loopingz commented on August 23, 2024

I've had the same issue, and it was because i used the default python from MacOS X ( /usr/bin/python ) if i use the one from ( /usr/local/bin/python ) it works

from esky.

djoproject avatar djoproject commented on August 23, 2024

The solution from loopingz didn't work in my case, there is no /usr/local/bin/python on my operating system.

But I found a workaround. I already had the same kind of issue with py2app alone and it seems to be the same issue with esky when using py2app.

For an unknown reason, py2app does not look for python modules on the host computer, it only looks in the ####.app directories. And guess what ? Because fcntl is a standard python package, it is not packaged with in the ####.app.

The solution consists to indicate to py2app to look after python modules in the host directories. Here is the solution:

In the setup.py file

    setup_kwargs['options'] = {
        'py2app': {
            'plist': {
                'PyResourcePackages': [
                    '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/'
                    '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/'
                ]
            }
        },
        'bdist_esky': {
            'freezer_module': 'py2app',
            'freezer_options': {
                'plist': {
                    'PyResourcePackages': [
                         '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/'
                         '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/'
                    ]
                }
            }
        }
    }

This solution is verbose on purpose and can be easily improved/simplified. Notice the fact that the plist informations are duplicated in py2app and in freezer_options. Esky does not retrieve information from py2app field and py2app does not retrieve information from bdist_esky field... So if you want to have a generic setup.py able to build app with py2app or with esky+py2app, the information needs to be duplicated.

For a basic application, only these two directories need to be added in PyResourcePackages, but if you use advanced application, for example with a graphical interface, maybe more directories need to be added. In my case, the app uses wxPython, and the following directory was needed:
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/

from esky.

rfk avatar rfk commented on August 23, 2024

Thanks for reaching out. Unfortunately this project is no longer actively maintained, so I'm going to move it into archive mode:

https://rfk.id.au/blog/entry/archiving-open-source-projects/

from esky.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.