Nuitka but support compile as Windows service
Project description
Nuitka-winsvc User Manual
Nuitka-winsvc is a forked version of Nuitka, it supports compiling EXE as a Windows service.
Install
You can install Nuitka-winsvc by pip:
pip install nuitka-winsvc
Usage
In addition to supporting all the command line arguments of Nuitka, Nuitka-winsvc also provides 7 additional arguments for compiling the Windows services:
--windows-serviceEnable Windows service mode, works only when compiling for Windows and onefile mode enabled.--windows-service-nameName of the Windows service. If not provided, the target program name will be used as the service name.--windows-service-display-nameDisplay name of the Windows service. If not provided, the product name will be attempted to use.--windows-service-descriptionDescription of the Windows service. If not provided, the file description will be attempted to use.--windows-service-cmdlineAdditional command line arguments that will be passed to the service, such as--config config.json --output output.log.--windows-service-installWindows service installation command-line argument. Default value isinstall.--windows-service-uninstallWindows service uninstallation command-line argument. Default value isuninstall.
Use the following command to build a Windows service:
python -m nuitka --onefile --output-dir=build --windows-service --windows-service-name=myservice --windows-service-display-name="My Service" --windows-service-description="This is the description of my service" --windows-service-cmdline="-c config.yml -o output.log" --windows-service-install=install --windows-service-uninstall=uninstall main.py
When the python program is compiled successfully, you can use the following command to install the service:
.\main.exe install
Also you can use the following command to uninstall the service:
.\main.exe uninstall
Note: Administrator privileges is required when installing and uninstalling the Windows services. You should run the above commands as administrator.
The compiled EXE executable file can be run both as a Windows service and as a regular Windows program. However, it is important to note that the Windows service installation and uninstallation command-line arguments which specified by --windows-service-install and --windows-service-uninstall of Nuitka-winsvc compilation arguments will override the original behavior of the program. Therefore, the compiled Python program should avoid using the same command line arguments.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nuitka_winsvc-4.0.2.tar.gz.
File metadata
- Download URL: nuitka_winsvc-4.0.2.tar.gz
- Upload date:
- Size: 4.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b91e46d161b28d76b86f82aeb79ed8157ee27f85f903c58f083452d1306fdc17
|
|
| MD5 |
ab2fe4d05c7015dfb40b7b15f8c237ad
|
|
| BLAKE2b-256 |
b724ddbc5e22006c96d783961a612d24cbd61a797b87c8210633c714c8121c32
|
File details
Details for the file nuitka_winsvc-4.0.2-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: nuitka_winsvc-4.0.2-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32631208dac8caa4844e8df383280c0d06697f3690bdee5ea4d4559b124d3140
|
|
| MD5 |
fd60d44fc919c5cdf5a9f62fc0ab3794
|
|
| BLAKE2b-256 |
54e3a5c475992fce5a6d7e83094eb7123dbce80170af590e961ba3927b3b87e2
|