Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support installation with pyinstaller #384

Closed
sirosen opened this issue Dec 3, 2020 · 0 comments · Fixed by #387
Closed

Support installation with pyinstaller #384

sirosen opened this issue Dec 3, 2020 · 0 comments · Fixed by #387
Assignees
Labels
enhancement New feature or improvement

Comments

@sirosen
Copy link
Member

sirosen commented Dec 3, 2020

User Story / Use-case

If you want to build a cross-platform application which bundles python, pyinstaller is one of the ways, if not the de-facto standard way, to do it.
In order to do so, pyinstaller has to bundle all of the dependency packages for the application, including the SDK, requests, six, etc.

Problem

Right now, an installation with pyinstaller fails because pyinstaller doesn't respect normal python package metadata. It doesn't use setuptools and it won't read setup.py, setup.cfg or MANIFEST.in.
Instead, pyinstaller has hooks and pre-defines a whole host of them for "common" python packages. We're obviously not in that list, so globus_sdk/globus.cfg is not loaded by pyinstaller and you get a borked install.

We've had this come up in user support, but we also have run into it internally where we use pyinstaller.

Given that we provide a very boring (metadata-wise) package by the most standard of means, it's kind of absurd that we're not supported out of the box. But whining about it won't fix things, and pyinstaller has drawn a clear line in the sand that they are not going to add support for any python build tools. (Given the pyproject.toml and "pluggable build system" changes, I'm not even sure I blame them...)

Implementation Options

  1. For completeness: we could get rid of globus.cfg and have no non-python package data. I don't like this option at all for a whole host of reasons. Let's not.

  2. Get a hook built into pyinstaller. (Won't happen; they'd be sure to reject it.)

  3. pyinstaller has a contrib package for adding hooks: https://github.com/pyinstaller/pyinstaller-hooks-contrib
    We could try to get a hook added there.

  4. We could write and add a hook to globus_sdk.

I think 3 and 4 are the only viable ones in this list, and I like 4 best because it works with pyinstaller out of the box and we're not beholden to anyone else who works on that contrib repo. The contrib hooks are really for cases like boto3 where a hook is needed and someone who is not affiliated with the project wants to add it.

My inclination right now is to write and add a hook, add a CI job which builds and runs a very minimal application with pyinstaller, and call it a day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant