Question about python distutils win32 version

This way you can use distutils to create a file like

PIL-1.1.6.win32-py2.5.exe

which you can run and use to easily install something. However, installation requires a user login to log in (you must click OK three times). I want to create an easy-to-install version of Windows that you can only run as the cmd command line, which does not require user input. Is it possible? These .exe files do this already, but do you need to pass them the cmd line magic argument to work?

+3
source share
3 answers

, :

: setup.py bdist_msi, msi,

+1

, "setup.py bdist_wininst". - , "setup.py bdist_dumb". ZIP , , Python, , , , , .

, Windows unzip, ; Cygwin Windows, .zip.

0

, , setuptools install script, . , , script PATH, .

, Python PATH, - python script, ( install.py somesuch).

import sys
from pkg_resources import load_entry_point

def install_egg(egg_file_path):
    sys.argv[1] = egg_file_path
    easy_install = load_entry_point(
        'setuptools==0.6c9', 
        'console_scripts', 
        'easy_install'
    )
    easy_install()

if __name__ == "__main__":
    install_egg("PIL-1.1.6.win32-py2.5.egg")

, "easy_install.py" script. script sys.argv, . .

0

Source: https://habr.com/ru/post/1713255/


All Articles