{"id":24635066,"url":"https://github.com/desty2k/crossinstaller","last_synced_at":"2025-05-08T20:56:39.980Z","repository":{"id":62565428,"uuid":"397712451","full_name":"desty2k/crossinstaller","owner":"desty2k","description":"Generate Python executables for multiple platforms","archived":false,"fork":false,"pushed_at":"2022-01-31T20:50:31.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-17T15:26:11.636Z","etag":null,"topics":["bundle","cross-platform","docker","package","py2app","py2exe","pyinstaller","python","python-3","python-to-exe"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/desty2k.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-18T19:22:37.000Z","updated_at":"2022-11-06T13:46:25.000Z","dependencies_parsed_at":"2022-11-03T16:00:54.170Z","dependency_job_id":null,"html_url":"https://github.com/desty2k/crossinstaller","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desty2k%2Fcrossinstaller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desty2k%2Fcrossinstaller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desty2k%2Fcrossinstaller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desty2k%2Fcrossinstaller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/desty2k","download_url":"https://codeload.github.com/desty2k/crossinstaller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235558309,"owners_count":19009396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bundle","cross-platform","docker","package","py2app","py2exe","pyinstaller","python","python-3","python-to-exe"],"created_at":"2025-01-25T09:14:18.606Z","updated_at":"2025-01-25T09:14:19.093Z","avatar_url":"https://github.com/desty2k.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CrossInstaller\n\n[![Build](https://github.com/desty2k/crossinstaller/actions/workflows/build.yml/badge.svg)](https://github.com/desty2k/crossinstaller/actions/workflows/build.yml)\n[![Version](https://img.shields.io/pypi/v/crossinstaller)](https://pypi.org/project/crossinstaller/)\n[![Version](https://img.shields.io/pypi/dm/crossinstaller)](https://pypi.org/project/crossinstaller/)\n\nCreate Python executables for Linux and Windows using one command.\n\n## Installation\n\nFrom PyPI\n\n```shell\npip install crossinstaller -U\n```\n\nFrom sources\n\n```shell\ngit clone https://github.com/desty2k/crossinstaller.git\ncd crossinstaller\npip install .\n```\n\n## Usage\n\n### Creating executables\n\nTarget platforms are specified by the `--platform` option. Option can be specified multiple times.\nAt least one platform must be specified. Available default platforms are: `win32`, `win64`, `i386`, `amd64`.\n\n```shell\ncrossinstaller some_script.py -p amd64 -p win64\n```\nThe above command will create two executables: `some_script` for Linux x64 and `some_script.exe` for Windows x64.\n\n### Adding custom platform\nUse `-a`/`--add-platform` option to add custom platform. For example, if you want to create \nan executable for `platform_name` platform, which use `dockerfile` Dockerfile, you can do it like this:\n```shell\ncrossinstaller some_script.py -a platform_name path/to/dockerfile\n```\nOption can be specified multiple times.\n\n### Passing extra arguments to the Pyinstaller\nYou can pass extra arguments to the Pyinstaller by using `-e`/`--options` option. \nMake sure to quote the arguments. __Note the extra space in the argument.__\n```shell\ncrossinstaller some_script.py --options \" -F --icon icon.ico\"\n```\n\n### Specifying the working directory\nBy default, the working directory is the same as the script directory. \nYou can specify custom working directory by using `-w`/`--workdir` option.\n```shell\ncrossinstaller path/to/some_script.py -w path/\n```\n\n### Using in a script\nYou can use crossinstaller as a Python module. Note that working directory will be changed to the script directory.\n\n```python\nfrom pathlib import Path\nfrom crossinstaller import Platform, CrossInstaller, get_default_platforms\n\nif __name__ == '__main__':\n    generator = CrossInstaller()\n    # add default platforms\n    generator.add_platforms(get_default_platforms())\n    # add custom platform\n    # note: all files required by the Dockerfile must be in the same directory as the Dockerfile\n    my_platform = Platform(\"my-platform-64\", Path(\"/usr/bin/my-platform-64/Dockerfile\"))\n    generator.add_platform(my_platform)\n    # start crossinstaller\n    generator.start(Path(\"path/to/my/script.py\"), keep_build=True, extra_options=\"-F\")\n    # start is non blocking, you can do other stuff here\n    # or wait for the build to finish\n    generator.wait()\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesty2k%2Fcrossinstaller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesty2k%2Fcrossinstaller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesty2k%2Fcrossinstaller/lists"}