tis-python3-32 icon

Python 3 (32-bit)

Silent install package for Python 3 (32-bit)

3.13.7-44

  • package: tis-python3-32
  • name: Python 3 (32-bit)
  • version: 3.13.7-44
  • categories: Development
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ
  • editor: Python Software Foundation
  • licence: opensource_free,wapt_public
  • locale: all
  • target_os: windows
  • impacted_process: pip,pip3,python,pythonw
  • architecture: all
  • signature_date:
  • size: 27.17 Mo
  • installed_size: 170.53 Mo
  • homepage : https://www.python.org/
  • depends:

package           : tis-python3-32
version           : 3.13.7-44
architecture      : all
section           : base
priority          : optional
name              : Python 3 (32-bit)
categories        : Development
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : Python is an interpreted, high-level, general-purpose programming language
depends           : tis-vcredist
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.1
sources           : https://www.python.org/downloads/windows/
installed_size    : 170533634
impacted_process  : pip,pip3,python,pythonw
description_fr    : Python est un langage de programmation interprété, multi-paradigme et multiplateformes
description_pl    : Python jest interpretowanym, wysokopoziomowym językiem programowania ogólnego przeznaczenia
description_de    : Python ist eine interpretierte Hochsprachenprogrammiersprache für allgemeine Zwecke
description_es    : Python es un lenguaje de programación interpretado, de alto nivel y de propósito general
description_pt    : Python é uma linguagem de programação interpretada, de alto nível, de uso geral
description_it    : Python è un linguaggio di programmazione interpretato, di alto livello e di uso generale
description_nl    : Python is een geïnterpreteerde, algemene programmeertaal op hoog niveau
description_ru    : Python - интерпретируемый, высокоуровневый язык программирования общего назначения
audit_schedule    : 
editor            : Python Software Foundation
keywords          : python,3,3.8,3.9,3.10,programming,language,interpreted,py,.py,code,coding,language,object-oriented
licence           : opensource_free,wapt_public
homepage          : https://www.python.org/
package_uuid      : 4743a7ec-7eac-4258-9841-0e9cabdff193
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://docs.python.org/3/whatsnew/changelog.html
min_os_version    : 6.2
max_os_version    : 
icon_sha256sum    : b55b23fa81945c6cd4c2f4f114188aa9f8f3d0c3cbb9fb353b2803ffbb67b43b
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-08-19T20:02:56.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : CabiUrZzNdyTlP3g/FwiuLPWRV3j4pMljESHtxyqddJ3ft4cZnWh+IbFC4pEVues+bWBzvwJKBC998HI11WIDguEpaGGp76Iy1X2WwMXGfAWboDi0JGs+h6wV0WL87r4oCPH/vOu4Uczlj5HA69s7heioSpIN+P0Xvm/+8b5lrzkLTXx4hlLPBr5eo+sF7JGWJfCvHQR1cfvmCVqszCTNSKOTYC0XaZuzyL+i9lgQFWE8Xpgetf1sJ6TYb78IJW55EBA3kRJ2xI0eDW6a49SMTuJlbI4wFdsWEQRuzo/gdxqEAWnAY4DCEITRVZeGTHJ6Qz9zptUWd4RrYxF4Zss2w==

# -*- coding: utf-8 -*-
from setuphelpers import *

python_version_to_uninstall_list = ["3.12","3.11","3.10", "3.9"]
python_version_to_keep_list = ["3.8", "3.6"]


def install():
    # Declaring local variables
    package_version = control.get_software_version()
    short_version = ".".join(package_version.split(".")[:2])
    digit_version = "".join(package_version.split(".")[:2])
    bin_name = glob.glob("python-*.exe")[0]
    app_name = control.name
    product_name = get_file_properties(bin_name)["ProductName"]
    if control.architecture == "x64":
        arch = "64-bit"
        app_dir_sub = makepath(programfiles, "Python%s")
    elif not iswin64():
        arch = "32-bit"
        app_dir_sub = makepath(programfiles, "Python%s-32")
        if not isdir(app_dir_sub) and isdir(makepath(programfiles, "Python%s")):
            # app_dir_sub = makepath(programfiles, "Python%s")
            uninstall_python(short_version)
    else:
        arch = "32-bit"
        app_dir_sub = makepath(programfiles32, "Python%s-32")
    app_dir = app_dir_sub % digit_version
    silent_args = '/quiet InstallAllUsers=1 PrependPath=1 AssociateFiles=1 Include_launcher=0 InstallLauncherAllUsers=0 TargetDir="%s"' % app_dir

    # Uninstalling intermediate Python version for Python 3.1x
    for python_version_to_uninstall in python_version_to_uninstall_list:
        if installed_softwares("Python %s" % python_version_to_uninstall):
            try:
                uninstall_python(python_version_to_uninstall)
            except:
                print("WARNING: Unable to uninstall Python %s.x" % python_version_to_uninstall)

    # Repairing if older installation is incomplete
    python_app = installed_softwares(name="Python %s" % short_version)
    if python_app and len(python_app) < 9 and not force:
        print("Repairing: %s in: %s" % (product_name, app_dir))
        run('"%s" /repair %s' % (bin_name, silent_args))

    # Installing the package
    if need_install(name="Python %s..*(%s)" % (short_version, arch), min_version=get_version_from_binary(bin_name), force=force):
        print("Installing: %s in: %s" % (product_name, app_dir))
        install_exe_if_needed(
            bin_name,
            silentflags=silent_args,
            key="",
            min_version=package_version,
            timeout=900,
        )
        if need_install(name="Python %s..*(%s)" % (short_version, arch), min_version=get_version_from_binary(bin_name)):
            error("%s is not installed" % app_name)
    else:
        print("%s is already installed and up-to-date" % app_name)

    # Copying installer for future uninstall
    if not isfile(makepath(app_dir, bin_name)):
        print("Copying: %s in: %s for future uninstall" % (bin_name, app_dir))
        filecopyto(bin_name, app_dir)


def uninstall():
    # Declaring local variables
    package_version = control.get_software_version()
    short_version = ".".join(package_version.split(".")[:2])
    uninstall_python(short_version)


def uninstall_python(python_version):
    # Declaring local variables
    digit_version = "".join(python_version.split(".")[:2])
    silent_uninst_args = "/uninstall /quiet"
    if control.architecture == "x64":
        arch = "64-bit"
        old_app_dir_sub = makepath(programfiles, "Python%s")
    elif not iswin64():
        arch = "32-bit"
        old_app_dir_sub = makepath(programfiles, "Python%s-32")
        if not isdir(old_app_dir_sub) and isdir(makepath(programfiles, "Python%s")):
            old_app_dir_sub = makepath(programfiles, "Python%s")
    else:
        arch = "32-bit"
        old_app_dir_sub = makepath(programfiles32, "Python%s-32")
    old_app_dir = old_app_dir_sub % digit_version

    # uninstalling it first avoids errors
    skip_uninstall = ["Executables", "Core Interpreter"]
    for p in skip_uninstall:
        for soft in installed_softwares(name="^Python %s" % python_version):
            if p in soft["name"]:
                continue
            for python_to_keep in python_version_to_keep_list:
                if python_to_keep in soft["name"]:
                    continue
            if iswin64() and (not arch in soft["name"]):
                continue
            print("Removing: %s" % soft["name"])
            run(uninstall_cmd(soft["key"]))

    # Uninstalling the package
    try:
        old_app_installer_path = glob.glob(r"%s\python-*.exe" % old_app_dir)[0]
        print("Removing Python %s with installer in folder: %s" % (python_version, old_app_dir))
        run('"%s" %s' % (old_app_installer_path, silent_uninst_args))
    except:
        print("Unable to remove Python %s with installer in folder: %s" % (python_version, old_app_dir))

    for soft in installed_softwares(name="^Python %s" % python_version):
        for python_to_keep in python_version_to_keep_list:
            if python_to_keep in soft["name"]:
                continue
        if iswin64() and (not arch in soft["name"]):
            continue
        print("Removing: %s" % soft["name"])
        run(uninstall_cmd(soft["key"]))

    # Removing remaining files of this Python version
    try:
        if isdir(old_app_dir):
            print("Removing remaining folder: %s" % old_app_dir)
            remove_tree(old_app_dir)
    except:
        print("Unable to remove Python %s remaining folder: %s" % (python_version, old_app_dir))

    # Removing system environment variables
    remove_from_system_path(old_app_dir)
    remove_from_system_path(makepath(old_app_dir, "Scripts"))

# -*- coding: utf-8 -*-
from setuphelpers import *


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    url = "https://www.python.org/downloads/windows/"
    download_dict = {
        "windows-x64": "-amd64.exe",
        "windows-arm64": "-arm64.exe",
        "windows-x86": ".exe",
        "windows-all": ".exe",
        "darwin-all": "-macos11.pkg",
    }

    # Getting latest version from official sources
    print("URL used is: %s" % url)
    for bs_search in bs_find_all(url, "a", proxies=proxies):
        if bs_search.string:
            if bs_search.string.startswith("Latest Python 3 Release"):
                version = bs_search.string.split("Python ")[-1]
    latest_bin = f'python-{version}{download_dict[control.target_os + "-" + control.architecture]}'
    download_url = f"https://www.python.org/ftp/python/{version}/{latest_bin}"

    # Downloading latest binaries
    print("Latest %s version is: %s" % (control.name, version))
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    # Checking version from file
    version_from_file = get_version_from_binary(latest_bin, "ProductName").split(" (")[0].split(" ")[-1]
    if Version(version_from_file, 4) != Version(version, 4) and version_from_file != "":
        print("Changing version to the version number of the binary (from: %s to: %s)" % (version, version_from_file))
        # os.rename(latest_bin, latest_bin.replace(version, version_from_file))
        version = version_from_file
    else:
        print("Binary file version corresponds to online version")

    # Changing version of the package
    if Version(version, 4) > Version(control.get_software_version(), 4):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

    # Deleting outdated binaries
    remove_outdated_binaries(version, filename_contains=latest_bin)

    # Validating or not update-package-sources
    return package_updated

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
c41b90667b794c5a0f8bddd8809b7e8b2958ee0941cda1504e335ea6e4d38f49 : WAPT/changelog.txt
758073dded358d910c2bce5ff2585a0e0a82c9aeba1d1c3c471785b0b143202f : WAPT/control
b55b23fa81945c6cd4c2f4f114188aa9f8f3d0c3cbb9fb353b2803ffbb67b43b : WAPT/icon.png
50f1b90c97493e5ba0a9d50c09af8134b844eeca4a5734aa825b827936b67c9d : luti.json
e31949f61d00ab398c93b21739209477b750b1f5716318e996062816ac2cfcd9 : python-3.13.7.exe
21419752dba0b1d914b36ae13dee62ebdd674493c220ec9af591f4014b9b9be2 : setup.py
d5316481db97083f4bdd1305d1365a19a86d347537d4b28f3d366396cb20e5ad : update_package.py

https://docs.python.org/3/whatsnew/changelog.html
3.12.1-44
===
uninstall python only when start by Python {version}

0-43
===
timeout=900 for install_exe_if_needed