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

Add hooks to upstream pyinstaller #56

Open
bowen4 opened this issue Sep 12, 2018 · 2 comments
Open

Add hooks to upstream pyinstaller #56

bowen4 opened this issue Sep 12, 2018 · 2 comments

Comments

@bowen4
Copy link

bowen4 commented Sep 12, 2018

I came upon this repository while attempting to package a grpc and google cloud firestore project using pyinstaller, as upstream pyinstaller does not have the hooks necessary to package these. Could I add the hooks under cloudfn/hooks to upstream pyinstaller? I am new to github so I apologise if this issue is not the right place for this.

@randolfo75
Copy link

randolfo75 commented Jan 12, 2019

I included the line:
datas += copy_metadata('google-cloud-firestore')

in file hook-google.cloud.py in .\Lib\site-packages\PyInstaller\hooks

It solved for me.

@MartinSahlen
Copy link
Owner

I would recommend looking at https://cloud.google.com/functions/docs/writing/#functions-writing-helloworld-http-python and not use this library (I am the author of this library).

strangemind added a commit to strangemind/pyinstaller that referenced this issue Jul 15, 2019
hook-firestore.py not hook-google-cloud-firestore.py
hook-firebase_admin.py
hook-grpc.py

hook-firestore.py

from MartinSahlen/cloud-functions-python#56
from PyInstaller.utils.hooks import copy_metadata
datas = copy_metadata('google-cloud-core')
datas += copy_metadata('google-cloud-firestore')
datas += copy_metadata('google-api-core')

hook-firebase_admin.py
from PyInstaller.utils.hooks import copy_metadata
datas = copy_metadata('google-api-core')
datas += copy_metadata('firebase-admin')

hook-grpc.py

from stackoverflow.com/questions/55848884/google-cloud-firestore-doesnt-get-added-to-pyinstaller-build
from PyInstaller.utils.hooks import copy_metadata, collect_data_files

datas = collect_data_files('grpc')

needs all the resources not just the py files
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

No branches or pull requests

3 participants