gkeepapi
gkeepapi copied to clipboard
Changes to requirements.txt and setup.py for enum34 on breaks pyinstaller - stops creation of exe
Using your sample code in README.md
- Runs from IDE
- Runs from cmd/PS using "python.exe TestKeep.py" - I copied the code to this file and replace the email/password
- Pyinstaller returns "The 'enum34' package is an obsolete backport of a standard library package and is incompatible with PyInstaller. Please
pip uninstall enum34then try again." - Uninstall enum34 and Pyinstall completes but when executing the exe we get "Traceback (most recent call last):
File "TestKeep.py", line 1, in
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module File "gkeepapi_init_.py", line 15, in File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module File "gpsoauth_init_.py", line 15, in File "importlib\metadata_init_.py", line 984, in version File "importlib\metadata_init_.py", line 957, in distribution File "importlib\metadata_init_.py", line 548, in from_name importlib.metadata.PackageNotFoundError: No package metadata was found for gpsoauth"
My understanding of enum34 is that is only required for Python versions prior to 3.4 and the recent change in the requirements.txt and setup.py needs to be reinstated to of "enum34>=1.1.6; python_version < '3.0'"
Additionally, please provide the following information:
- [ ] Operating system is Windows 10 x64 fully updated
- [ ] Python version is Python 3.10.4 x32
Opps, thanks for opening this issue. I've cleaned up the version specifiers for enum34 and uploaded a new release.
I also found I needed to add the --copy-metadata parameter to pyinstaller command to produce an exe that runs without the "from_name importlib.metadata.PackageNotFoundError: No package metadata was found for gpsoauth error"
pyinstaller --copy-metadata gpsoauth --onefile --clean TestKeep.py produces an exe of your sample code creates a red note to Eat Breakfast.
gkeepapi is a very useful module - I do appreciate your efforts and sharing this.
I suspect this might have to do with the dynamic version here: https://github.com/kiwiz/gkeepapi/blob/master/setup.py#L17. Could you try hardcoding a version to see if that allows you to build an executable correctly?
(I'm also curious what you're using the lib for, if you don't mind sharing)
Closing inactive issues.