Repository navigation
py2app packaging #10
Description
Activity
On dimple I have been experimenting with using Travis to package builds. It works well, you can generate a "build artifact" and then post it to the "gh-pages" branch which makes it show up on github.io. That way it would be done in a clean environment automatically with all reproducibility instructions in one place.
Thanks Steve! I think getting it on Travis would be great as a way to automate the builds on a clean system.
In the mean time, I've figured out that we can explicitly pass the following argument to py2app:
python setup.py py2app --frameworks /opt/local/lib/libffi.6.dylibThis is somewhat strange still, since on systems where it initially fails, libffi is usually present but for some reason the embedded python runtime from the built pacakge is not looking there. I expect there's a bad configuration in my setup somewhere... On systems where the package doesn't run, I can simply copy over the local version of libffi alongside the embedded dylibs, and everything will work fine. For now the above explicit inclusion works, except I also found that in my particular case a system before High Sierra (10.12) does not like that version of libffi...
Hi libmapper/webmapper team,
On Ubuntu / Pop!_OS 20.04,
pip3 install py2appthenpython3 setup.py py2appfails with:copying file build/bdist.linux-x86_64/python3.8-standalone/app/python38.zip -> dist/WebMapper.app/Contents/Resources/lib Traceback (most recent call last): File "setup.py", line 17, in <module> setup(name='WebMapper', File "/usr/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "~/.local/lib/python3.8/site-packages/py2app/build_app.py", line 907, in run self._run() File "~/.local/lib/python3.8/site-packages/py2app/build_app.py", line 1125, in _run self.run_normal() File "~/.local/lib/python3.8/site-packages/py2app/build_app.py", line 1238, in run_normal self.create_binaries(py_files, pkgdirs, extensions, loader_files) File "~/.local/lib/python3.8/site-packages/py2app/build_app.py", line 1545, in create_binaries dst = self.build_executable( File "~/.local/lib/python3.8/site-packages/py2app/build_app.py", line 2315, in build_executable self.copy_file(zlib.__file__, os.path.dirname(arcdir)) AttributeError: module 'zlib' has no attribute '__file__'From the first line I assume packaging has been developed for macOS only?
Kind regards,
ChristianIt's been a while, but I thought the Windows equivalent of py2app was py2exe. Probably things have changed.
Answer from the py2app website: py2app - Create standalone Mac OS X applications with Python.
Maybe the libmapper README could state "To build standalone application on macOS"?
- Hi Christian, Thanks for the feedback – I updated the documentation with the changes you suggested. Cheers, Joe…On May 26, 2020, at 7:00 PM, Christian Frisson ***@***.***> wrote: Answer to self: py2app - Create standalone Mac OS X applications with Python <https://py2app.readthedocs.io/>. Maybe the libmapper README could state "To build standalone application on macOS"? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#10 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAD7CDEOOHSVK4DD7B7GFLDRTQ3ZFANCNFSM4GXZQZRA>.
py2app should be deprecated in favour of pyinstaller, via #48 and earlier contributions on https://github.com/libmapper/webmapper/commits/main/webmapper.spec by @bboettcher3
I've been experimenting with the packaging process, and have ran into the following:
the basic process to bundle the package is to just run the following after py2app is installed:
python setup.py py2appalso note that currently setup.py doesn't include the html folder in data_files, so that needs to be added to the list for the base html file to be included in the package it seems.