tis-vscode-python

2021.1.502429796-6
Python VSCode Extension
408 downloads
Download

  Description 

  • package : tis-vscode-python
  • version : 2021.1.502429796-6
  • architecture : all
  • categories : Development
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • description : Python VSCode Extension
  • locale : all
  • target_os : all
  • min_os_version :
  • max_os_version :
  • min_wapt_version : 1.7
  • sources : https://marketplace.visualstudio.com/items/ms-python.python
  • installed_size : 76488704
  • impacted_process :
  • description_fr :
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Microsoft
  • licence :
  • signature_date : 2021-02-09T17:23:58.410591
  • Depends :

  Setup.py 

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

uninstallkey = []

# Defining variables
ext_name = 'ms-python-release.vsix'
app_from_path = 'code'


def install():
    # Initializing variables
    if get_os_name() == 'Windows':
        app_dir = makepath(programfiles, 'Microsoft VS Code')
    elif get_os_name() == 'Linux':
        app_dir = '/usr/share/code/'
    elif get_os_name() == 'Darwin':
        app_dir = '/Applications/Visual Studio Code.app/'
    ext_path = makepath(app_dir, ext_name)

    # Copying extension to app_dir
    print("Copying %s to %s" % (ext_name, app_dir))
    filecopyto(ext_name, app_dir)


def session_setup():
    # Initializing variables
    if get_os_name() == 'Windows':
        app_dir = makepath(programfiles, 'Microsoft VS Code')
    elif get_os_name() == 'Linux':
        app_dir = '/usr/share/code/'
    elif get_os_name() == 'Darwin':
        app_dir = '/Applications/Visual Studio Code.app/'
    ext_path = makepath(app_dir, ext_name)

    # Installing extension in user env
    print("Installing %s extension in user env" % ext_name)
    run_notfatal('%s --install-extension "%s"' % (app_from_path, ext_path))


def update_package():
    # Initializing variables
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    git_repo = 'microsoft/vscode-python'
    url_api = 'https://api.github.com/repos/%s/releases/latest' % git_repo

    # Getting latest version from official sources
    print('API used is: %s' % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))
    for download in json_load['assets']:
        if download['name'] == ext_name:
            url_dl = download['browser_download_url']
            break
    version = json_load['tag_name']
    latest_bin = ext_name

    print("Latest %s version is %s" % (app_name, version))
    print("Download url is %s" % url_dl)

    # Downloading latest binaries
    print('Downloading %s' % latest_bin)
    wget(url_dl, latest_bin, proxies=proxies)

    # Changing version of the package
    control.version = '%s-%s' % (version, control.version.split('-', 1)[-1])
    control.save_control_to_wapt()
    print("Changing package version to %s in WAPT\\control" % control.version)




def get_os_name():
    return platform.system()


def get_proxies():
    import platform
    if platform.python_version_tuple()[0] == '3':
        from urllib.request import getproxies
    else:
        from urllib import getproxies
    return getproxies()


def get_proxies_from_wapt_console():
    proxies = {}
    if platform.system() == 'Windows':
        waptconsole_ini_path = makepath(user_local_appdata(), 'waptconsole', 'waptconsole.ini')
    else:
        waptconsole_ini_path = makepath(user_home_directory(), '.config', 'waptconsole', 'waptconsole.ini')
    if isfile(waptconsole_ini_path):
        proxy_wapt = inifile_readstring(waptconsole_ini_path, 'global', 'http_proxy')
        if proxy_wapt:
            proxies = {'http': proxy_wapt, 'https': proxy_wapt}
    return proxies


										

  Changelog 


Changelog software url : https://marketplace.visualstudio.com/items/ms-python.python/changelog

No changelog
  manifest.sha256 
[["ms-python-release.vsix","5362af39fb5d0f18379cb0e2b8846899aa7ad18bde4a5edd6ad4e78752be3b37"],["setup.py","2f4a7d8fa88329bb9f03a9aebdb31bcae646d5d7465bfd3a5dd562b050b78377"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/control","b912fb1e20aaa20759bd536bc5cb4887244e2f313f4d88198e6e92c604714414"]]