I have a problem with making an installer for a python program. The program has a UI based on PyQt5 and QT-PyQt-PySide-Custom-Widgets. During the development phase, I used the Conda environment because of the specific custom widgets version, which requires the Cairo package. The program is written for Windows. I have uploaded the list of requirements below:
dependencies:
- python==3.7.3
- cairo
- pip
- pip:
- PyQt5==5.15.4
- PyQt5-Qt
- PyQt5-sip==12.12.1
- PySide2==5.15.2.1
- iconify==0.0.103
- pandas==1.3.5
- QT-PyQt-PySide-Custom-Widgets==0.6.8
- pyserial
- openpyxl
I would like the installer to produce a program that is plug and play. That is, it will prepare the entire folder structure including files and dependencies and a bash script that will run main.py.
For the sake of formality, so far I have used the following bash script:
call conda activate progName
call python main.py
I would appreciate advice on what tool to use and how to prepare the installer in the right way.
I tried using pyinstaller, while it probably can’t handle the Cairo package, which is not in pip. I also tried using conda constructor while the installer only prepared a folder with dependencies without my code files.
Conda constructor
post_install.bat:
@echo off
SETLOCAL
CALL %~dp0..Scriptsactivate.bat %~dp0..env
pip install PyQt5==5.15.4 PyQt5-Qt PyQt5-sip==12.12.1 PySide2==5.15.2.1 iconify==0.0.103 QT-PyQt-PySide-Custom-Widgets==0.6.8
ENDLOCAL
construct.yaml:
name: ###
version: 4.4
installer_type: exe
channels:
- defaults
- conda-forge
- ales-erjavec
- anaconda
- fastchan
specs:
- python==3.7.3
- cairo
- pip
post_install: scripts/post_install.bat
bsotrow1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.