Install python packages in InnoSetup installer via pip install requirements.txt

Issue #134 resolved
M. Gronle created an issue

The inno setup handles the installation of selected python packages. This should be improved in the future.

Current situation:

  1. Python packages, that should be contained in a setup, are manually selected
  2. All dependencies of these packages are manually discovered
  3. All packages and dependencies are manually downloaded from pypi.org and stored in one network share
  4. The inno setup script is adapted to pack all these whl-files into the setup executable and to install every
    whl file using pip install whl

Desired situation:

  1. Write a requirements.txt file (see Python pip), that contains all major packages (see step 1 above). It is possible to choose
    some version constraints there
  2. Use the pip download command to download all these packages including all their dependencies to an empty network share
  3. Change the inno setup script to pack all files in this directory, including the requirements.txt file, into the setup executable
  4. When exeucting the setup, unpack all these files to a temporary folder. Then use one single pip install command to install these
    packages based on the requirements.txt. Choose no-index to prevent pip from downloading the whl files live from pypi.org and set find-files to the temporary folder. This is one pip install command instead of many commands in the current implementation.
  5. Remove the files from the temporary folder if done.

The advantage is, that the inno setup script has not to be changed for future setups. Additionally, one must not search for all necessary whl files.

Start implementing this based on a requirements.txt file, that contains the major packages of the current setup itom 4.0:

pip>=20.0
wheel>=0.34
setuptools>=47.0
numpy>=1.18
scipy>=1.4
matplotlib>=3.2
scikit-image
opencv_python
jedi>=0.17
flake8>=3.8

Comments (3)

  1. Log in to comment