Détails du package

smp-wsl-ssh-pageant

retour Revenir à la liste des packages

smp-wsl-ssh-pageant

Fichier control :

package           : smp-wsl-ssh-pageant
version           : 20190513-12
architecture      : all
section           : base
priority          : optional
name              : 
categories        : 
maintainer        : Simon Fonteneau
description       : 
depends           : 
conflicts         : 
maturity          : 
locale            : 
target_os         : windows
min_os_version    : 
max_os_version    : 
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      : 66f61f18-1587-4f05-9c50-8e859f12d144
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 1e54425be03a2a3ea1a264b40d984c31f17a6a489a3b722acb993cbf6561e903
signature         : wo/In8sbe+9CVOLaN1DVF8svTVyMwKW7HuqTSM3zfvRHndsIE1SDkzpYIgn4l5GaJYHa5B4wedi6F2jPHBvNdR0efGcumVtgte5MIm8Q/goY/D/Uj8YcdMhJiAyVvWL3Bs+manUIAPyBZRHH7jeLWTYKn7F8wTOxud4nsBnxhKAtFXAgbXvBoYX0piIgxhya1AU5LUbxldv2aeGsx6WtaZnRBtVRWQpnznCpmHRw8j17Wr7gv4ABLrCSNwhIIYK7x/BOIFRYWbXsXu6eb8WYthyF5XeDfCyqfeoG1o5Qd0GkEdNB/x0ukcUITpFGQto15BhIYDJfkC0cveWDMrnhiQ==
signature_date    : 2020-07-04T01:23:05.240026
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,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,signer,signer_fingerprint,signature_date,signed_attributes



Fichier setup.py :

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

uninstallkey = []

path = makepath(programfiles,'wsl-ssh-pageant')

def install():
    if not isdir(path):
        mkdirs(path)
    filecopyto('wsl-ssh-pageant-amd64-gui.exe',makepath(path,'wsl-ssh-pageant-amd64-gui.exe'))

def uninstall():
    remove_tree(path)

def session_setup():
    create_shortcut(makepath(startup(),'wsl-ssh-pageant.lnk'),makepath(path,'wsl-ssh-pageant-amd64-gui.exe'),'-wsl %s\\wsl-ssh-pageant.sock' % os.environ['USERPROFILE'])

def update_package():
    import json
    print('Update package content from upstream binary sources')

    # Getting proxy informations from WAPT settings
    proxy = {}
    if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')):
        proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
        if proxywapt :
            proxy = {'http':proxywapt,'https':proxywapt}
    browser_download_url = [ i['browser_download_url'] for i in json.loads(wgets('https://api.github.com/repos/benpye/wsl-ssh-pageant/releases/latest',proxies=proxy))['assets'] if i['browser_download_url'].endswith('-amd64-gui.exe')][0]

    latest_bin = browser_download_url.split('/')[-1]

    # Downloading latest binaires

    remove_file(latest_bin)
    print('Downloading ' + browser_download_url)
    wget(browser_download_url,latest_bin,proxies=proxy)

    # Change version of the package
    version = browser_download_url.split('/')[-2].split('.')[0]

    print('Latest version is: ' + version)
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())
    pe.version = version + '-0'
    pe.save_control_to_wapt(os.getcwd())
    print ('Update package done. You can now build-upload your package')



if __name__ == '__main__':
    update_package()