tis-python310-tranquilit icon

tis-python310-tranquilit

Silent install package for tis-python310-tranquilit

3.10.19-51

Preprod packages are packages built on LUTI. They remain in PREPROD usually for 5 days, after which a new VirusTotal scan is performed.
If the package passes this last check, it is promoted to PROD and published on the store.

  • package: tis-python310-tranquilit
  • version: 3.10.19-51
  • maintainer: sfonteneau
  • locale: all
  • target_os: linux
  • architecture: arm64
  • signature_date:
  • size: 64.78 Mo

package           : tis-python310-tranquilit
version           : 3.10.19-51
architecture      : arm64
section           : base
priority          : optional
name              : 
categories        : 
maintainer        : sfonteneau
description       : Package for tis-python-3.10-tranquilit
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : all
target_os         : linux
min_wapt_version  : 2.0
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Paquet pour tis-python-3.10-tranquilit
description_pl    : Pakiet dla tis-python-3.10-tranquilit
description_de    : Paket für tis-python-3.10-tranquilit
description_es    : Paquete para tis-python-3.10-tranquilit
description_pt    : Pacote para tis-python-3.10-tranquilit
description_it    : Pacchetto per tis-python-3.10-tranquilit
description_nl    : Pakket voor tis-python-3.10-tranquilit
description_ru    : Пакет для tis-python-3.10-tranquilit
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : f83c4035-8b90-4364-833b-85fadcba7d44
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : b55b23fa81945c6cd4c2f4f114188aa9f8f3d0c3cbb9fb353b2803ffbb67b43b
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2025-11-24T21:48:13.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         : bOMgBlvmNP8PfGAQZYy/5MaEj8TAqJ2VfDe9rcxMX+zGgQC3TglpT8pZA8iWXieWUzaPW4jO0zq2NW/vctgbFARoQV/8FZFFrEbUA3EOutakne8/MwMr39Jxb7UyUu7q0DVitc+tBDxiqwGpOaWBRF/qNo7noMM3hwQ3+roMKno1p9M5teo36xO1Dnqg1K/2C0ALjH7P8OCCR1q4zmcyzTsH5/lIsAW/vzHkysnvqTAGNzMK7oqdh9QJqdhVzwRd9MIUzxcU/bDq+S8AvKXZcQNiib8pUhSWDa/IDSJkdLzgRdHv98GWty+rUXPyHem+ynWEVv66TK9IBi8w7hfSEw==

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

def install():
    mkdirs('/opt/python310/')
    f= glob.glob('*.tar.gz')[0]
    python_version = control.get_software_version()
    run('cd /opt/python310/ ; tar -xzf %s' % makepath(basedir,f))

def audit():
    python_version = run('/opt/python310/bin/python3 -V').split(' ')[1].strip()

    if Version(python_version) != control.get_software_version():
        print('version install : %s' % python_version)
        return "ERROR"
    else:
        return "OK"

# -*- coding: utf-8 -*-

from setupdevhelpers import *
from waptutils import CustomZipFile
from waptutils import create_recursive_zip

import distro
import platform
import tarfile
import json
import subprocess
import datetime
import sys
sys.path.append('.')
from get_cots import download_cots

python_name_file = str(platform.system().lower() + '_' + platform.machine().lower() + '_' .strip('_'))
download_directory = r'c:\tranquilit'


unix_python_dir='/opt/python310'

def update_package():
    if platform.system() =='Linux':
        update_package_linux()
        return
    elif platform.system() =='Windows':
        update_package_windows()
        return
    elif platform.system() == 'Darwin':
        update_package_macos()
    else:
        print('non supported os')
        raise()

def update_package_linux():
    print("[UTC %s] start building chroot env" % datetime.datetime.utcnow())
    if type_debian():
        subprocess.run('bash step1_prepare_debian_chroot.sh', shell=True, stderr=sys.stdout, stdout=open('/root/compile_python.log','w'))
    elif type_redhat():
        subprocess.run('bash step1_prepare_redhat_chroot.sh', shell=True, stderr=sys.stdout, stdout=open('/root/compile_python.log','w'))

    print("[UTC %s] start downloading cots" % datetime.datetime.utcnow())
    download_cots(download_directory=r'/root/python_build_chroot/root/')

    print("[UTC %s] start compiling python" % datetime.datetime.utcnow())
    filecopyto('step2_compile_python_in_chroot.sh','/root/python_build_chroot/root/')
    subprocess.run('chroot /root/python_build_chroot /bin/bash /root/step2_compile_python_in_chroot.sh  %s' % unix_python_dir, shell=True, stderr=sys.stdout, stdout=open('/root/compile_python.log','a'))

    print("[UTC %s] targzipping python distrib" % datetime.datetime.utcnow())
    run('tar -zcf %s/python-%s.tar.gz -C /root/python_build_chroot/%s .' % (basedir, python_name_file, unix_python_dir))

    if params:
        commit_count = params.get("commit_count",0)
    else:
        val = subprocess.check_output('git rev-list --count HEAD', shell=True)
        commit_count = int(val)
    control.version = "%s-%s" % (control.version.split('-')[0], commit_count)
    control.save_control_to_wapt()


def update_package_windows():

    print("[UTC %s] start building " % datetime.datetime.utcnow())

    print("[UTC %s] start downloading cots" % datetime.datetime.utcnow())
    download_cots(download_directory=basedir)


    #Download and extract python source
    wget(f'http://srvtemplates.ad.tranquil.it/binary_cache/Python-{versionpython}.tgz',f'Python-{versionpython}.tgz')
    unzip_with_7zip(f'Python-{versionpython}.tgz',f'Python-{versionpython}-tar')
    unzip_with_7zip(rf'Python-{versionpython}-tar\Python-{versionpython}.tar','.')

    remove_tree(f'Python-{versionpython}-tar')
    remove_file(f'Python-{versionpython}.tgz')

    #Download and extract openssl source
    wget(rf'http://srvtemplates.ad.tranquil.it/binary_cache/openssl-{openssl_version}.tar.gz',rf'openssl-{openssl_version}.tar.gz')
    unzip_with_7zip(rf'openssl-{openssl_version}.tar.gz',rf'openssl-{openssl_version}-tar')
    unzip_with_7zip(rf'openssl-{openssl_version}-tar\openssl-{openssl_version}.tar','.')
    remove_tree(rf'openssl-{openssl_version}-tar')
    remove_file(rf'openssl-{openssl_version}.tar.gz')

    if not isfile(r'C:\Program Files\NASM\nasm.exe'):
        error(r'C:\Program Files\NASM\nasm.exe not found')

    run(rf'Python-{versionpython}\PCbuild\get_externals.bat',timeout=5000)

    with open(rf'openssl-{openssl_version}\Configurations\60-custom.conf','w') as f:
        f.write(data_custom)

    add_to_system_path(r'C:\Program Files\NASM')
    run(rf'cd openssl-{openssl_version} & set path=C:\Program Files\NASM;%path% &"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars32.bat" &"C:\Strawberry\perl\bin\perl.exe" configure VC-WIN32-rtt & nmake',timeout=7200)

    name_openssl_folder = glob.glob(rf'Python-{versionpython}\externals\openssl-bin-*')[0].split('\\')[-1]

    shutil.move(rf'Python-{versionpython}\externals\{name_openssl_folder}\win32',rf'Python-{versionpython}\externals\{name_openssl_folder}\win32old')
    shutil.move(rf'openssl-{openssl_version}',rf'Python-{versionpython}\externals\{name_openssl_folder}\win32')
    filecopyto(rf'Python-{versionpython}\externals\{name_openssl_folder}\win32old\include\applink.c',rf'Python-{versionpython}\externals\{name_openssl_folder}\win32\include\applink.c')

    with open(makepath(f'Python-{versionpython}','PCbuild','openssl.props'), 'r') as f:
        data=f.read()
    data = data.replace(r"<_DLLSuffix>-1_1</_DLLSuffix>",r"<_DLLSuffix>-3</_DLLSuffix>")
    with open(makepath(f'Python-{versionpython}','PCbuild','openssl.props'), 'w') as f:
        f.write(data)

    #Disable VENV_REDIRECT
    for vcxproj in ['venvlauncher.vcxproj','venvwlauncher.vcxproj']:
        with open(makepath(f'Python-{versionpython}','PCbuild',vcxproj), 'r') as f:
            data=f.read()
        data = data.replace(r";VENV_REDIRECT;",r";")
        with open(makepath(f'Python-{versionpython}','PCbuild',vcxproj), 'w') as f:
            f.write(data)

    run(rf'Python-{versionpython}\PCbuild\build.bat -p Win32 -t Rebuild',timeout=5000)

    pathnug = makepath(basedir,'Python-%s' % versionpython,'externals','windows-installer','nuget')
    mkdirs(pathnug)
    filecopyto(makepath(basedir,'Python-%s' % versionpython,'externals','nuget.exe'),pathnug)

    run(rf'"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\msbuild.exe" "%s\Python-{versionpython}\Tools\nuget\make_pkg.proj" /t:Build  /p:Configuration=Release /p:OutputPath="%s"' % (basedir,basedir))


    unzip('pythonx86.%s.nupkg' % versionpython,makepath(basedir,'tmppython'))

    copytree2(makepath('Python-%s' % versionpython,'externals',name_openssl_folder,'win32','include','openssl'),makepath(basedir,'tmppython','tools','Include','openssl'))

    for p in glob.glob(makepath('Python-%s' % versionpython,'externals',name_openssl_folder,'win32','*.lib')):
        filecopyto(p,makepath(basedir,'tmppython','tools','libs'))

    copytree2(makepath(basedir,'tmppython','tools'),'Python-%s' % versionpython)

    remove_tree(makepath(basedir,'tmppython'))

    remove_file('Python-%s.tgz' % versionpython)
    remove_file('pythonx86.%s.nupkg' % versionpython)

    if params:
        commit_count = params.get("commit_count",0)
    else:
        val = subprocess.check_output('git rev-list --count HEAD', shell=True)
        commit_count = int(val)
    control.version = "%s-%s" % (control.version.split('-')[0], commit_count)
    control.save_control_to_wapt()




data_custom = r"""## -*- mode: perl; -*-
## Personal configuration targets

my %targets = (
    "VC-WIN32-rtt" => {
        inherit_from     => [ "VC-WIN32" ],
        cflags           => sub{my $v=pop; $v=~ s/\/MD/\/MT/ig; return $v},
        lflags           => "/nologo /release",
    },
    "VC-WIN64A-rtt" => {
        inherit_from     => [ "VC-WIN64A" ],
        cflags           => sub{my $v=pop; $v=~ s/\/MD/\/MT/ig; return $v},
        lflags           => "/nologo /release",
    },
);"""


def update_package_macos():


    print("[UTC %s] start downloading cots" % datetime.datetime.utcnow())
    download_cots(download_directory=r'/var/root/')

    print("[UTC %s] start compiling python" % datetime.datetime.utcnow())
    filecopyto('step2_compile_python_macos.sh','/var/root/')
    subprocess.run('/bin/bash step2_compile_python_macos.sh %s' % unix_python_dir, shell=True, stderr=sys.stdout, stdout=open('/var/root/compile_python.log','a'))

    print("[UTC %s] targzipping python distrib" % datetime.datetime.utcnow())
    run('tar -zcf %s/python-%s.tar.gz -C /opt/python310 .' % (basedir, python_name_file))

    if params:
        commit_count = params.get("commit_count",0)
    else:
        val = subprocess.check_output('git rev-list --count HEAD', shell=True)
        commit_count = int(val)
    control.version = "%s-%s" % (control.version.split('-')[0], commit_count)
    control.save_control_to_wapt()



01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
02645b12df01334d7b80ba792f63fe29f4a614d3c71d714d511735bfedfe1a4d : WAPT/control
b55b23fa81945c6cd4c2f4f114188aa9f8f3d0c3cbb9fb353b2803ffbb67b43b : WAPT/icon.png
351e30ade87f69393066c7928edefe00656d2837f4817b83ed8f895267ca111b : get_cots.py
668be2c5cf366bc74b5a75553582be30c89f3e1688b60b736afb395a8c627441 : luti.json
01c0a3309a44d111fd1e31bd05821965b18c7b795c272665cad3229d5954c73d : python-linux_aarch64.tar.gz
0539c3952c7bd8053e02553063ff669c3642e91c6b0deb960d4264223583d235 : python_sbom.cdx.json
1d1f4915bee0aa846b3adff0599b922bca7ff927b0dc9e519b16d38322eb9213 : setup.py
1f4430bec03de17c8f0c0350397f778ce4f1682d832e6e6c6487b6747c528fb3 : step1_prepare_debian_chroot.sh
da87b9237f3864e0d6a3d3da7d740aa9528895787f45e00bf3b09e87e9871b1a : step1_prepare_redhat_chroot.sh
ee15a45431f04600a1b09bcb04f1d72bf5d015b04e5ac6b9fdce1ffdfdd952a3 : step2_compile_python_in_chroot.sh
b16cae8b12b56d7dc7860468fb2481f6712a362d27c98f884ba73458515b86c8 : step2_compile_python_macos.sh
40c245a61a039f1feee53d9712b696ef13e2c3aa78ce7d258a9eda7db02c55c4 : update_package.py