CrossInstaller
Create Python executables for Linux and Windows using one command.
Installation
From PyPI
pip install crossinstaller -U
From sources
git clone https://github.com/desty2k/crossinstaller.git
cd crossinstaller
pip install .
Usage
Creating executables
Target platforms are specified by the --platform option. Option can be specified multiple times.
At least one platform must be specified. Available default platforms are: win32, win64, i386, amd64.
crossinstaller some_script.py -p amd64 -p win64
The above command will create two executables: some_script for Linux x64 and some_script.exe for Windows x64.
Adding custom platform
Use -a/--add-platform option to add custom platform. For example, if you want to create
an executable for platform_name platform, which use dockerfile Dockerfile, you can do it like this:
crossinstaller some_script.py -a platform_name path/to/dockerfile
Option can be specified multiple times.
Passing extra arguments to the Pyinstaller
You can pass extra arguments to the Pyinstaller by using -e/--options option.
Make sure to quote the arguments. Note the extra space in the argument.
crossinstaller some_script.py --options " -F --icon icon.ico"
Specifying the working directory
By default, the working directory is the same as the script directory.
You can specify custom working directory by using -w/--workdir option.
crossinstaller path/to/some_script.py -w path/
Using in a script
You can use crossinstaller as a Python module. Note that working directory will be changed to the script directory.
from pathlib import Path
from crossinstaller import Platform, CrossInstaller, get_default_platforms
if __name__ == '__main__':
generator = CrossInstaller()
# add default platforms
generator.add_platforms(get_default_platforms())
# add custom platform
# note: all files required by the Dockerfile must be in the same directory as the Dockerfile
my_platform = Platform("my-platform-64", Path("/usr/bin/my-platform-64/Dockerfile"))
generator.add_platform(my_platform)
# start crossinstaller
generator.start(Path("path/to/my/script.py"), keep_build=True, extra_options="-F")
# start is non blocking, you can do other stuff here
# or wait for the build to finish
generator.wait()
Metadata
Release files for crossinstaller 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crossinstaller-0.2.0.tar.gz | 7.6 kB | Without provenance | Details for crossinstaller-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crossinstaller-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for crossinstaller-0.2.0-py3-none-any.whl |
Total release size: 23.5 kB
Release files / crossinstaller-0.2.0.tar.gz
| Download URL | crossinstaller-0.2.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e34ef4505db11d95e0ded6b88c9a411e211444b3c5995a4687fe5ea2050d820
|
|
BLAKE2b-256 checksum How to use checksums |
1eeee8901b876b5322f7432ccba7eb5c0eda62688a65c3ea07732a1b13a39725
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Release files / crossinstaller-0.2.0-py3-none-any.whl
| Download URL | crossinstaller-0.2.0-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b1771a4c5902866c61022adbf0349943570d0846b4c5728d865b12f0522c59a
|
|
BLAKE2b-256 checksum How to use checksums |
456766839532a82e443fca6a4d6720c05f931ca7e6cc62d7db1a1ee498ce0cce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Security for crossinstaller 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.